You need to include the .moc file in the plugin source file as well: // AddCustomQt.cpp #include <QtCore/QObject> #include "DDImage/NukeWrapper.h” #include "DDImage/PixelIop.h" #include "DDImage/Row.h" #include "AddCustomQt.moc.h" #include "AddCustomQt.moc" // Add this
I’m not sure why this was overlooked in the example. -Nathan From: davidw Sent: Thursday, November 29, 2012 12:58 AM To: [email protected] Subject: [Nuke-dev] Error trying to get the AddCustomQt plugin examplerunning Hi guys! I've been really trying to get the "AddCustomQt" plugin example running here, but I get an error that I can't figure out. Please help me with this because I need to, in the end, to get a custom written knob type done for a new grading tool I'm developing. Basically I've got it to compile just fine with the Qt sources from Foundry's developer site, but when I try to actually create the node in Nuke I get this error: "RuntimeError: /mnt/42/profiles_linux/da_wa/.nuke/AddCustomQt.so: undefined symbol: _ZTV8MyWidget" Here are some more info bits regarding my system and what I've done: We're running Nuke6.3v7 on Linux 64-bit (Fedora 13). uname output: "Linux robin 2.6.34.9-69.fc13.x86_64 #1 SMP Tue May 3 09:23:03 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux" The makefile is the one you provided, just changed the path and added a copy file command in the end: Code: QTDIR = /mnt/42/profiles_linux/da_wa/Documents/nuke-qt-4.6.2-linux64 MOC = $(QTDIR)/bin/moc NDKDIR ?= /usr/local/Nuke6.3v7 MYCXX ?= gcc412 LINK ?= gcc412 INCPATH = -I$(NDKDIR)/include -I$(QTDIR)/include CXXFLAGS ?= -g -c -DUSE_GLEW -fPIC -msse $(INCPATH) LINKFLAGS ?= -L$(NDKDIR) LIBS ?= -lDDImage -lQtGui LINKFLAGS += -shared all: AddCustomQt.so .PRECIOUS : %.os AddCustomQt.moc: AddCustomQt.moc.h $(MOC) $< -o $@ AddCustomQt.os: AddCustomQt.cpp AddCustomQt.moc $(MYCXX) $(CXXFLAGS) -o $(@) $< AddCustomQt.so: AddCustomQt.os $(LINK) $(LINKFLAGS) $(LIBS) -o $(@) $< cp *.so /mnt/42/profiles_linux/da_wa/.nuke clean: rm -rf *.os AddCustomQt.so AddCustomQt.moc Running "make" gives me this output: "/mnt/42/profiles_linux/da_wa/Documents/nuke-qt-4.6.2-linux64/bin/moc AddCustomQt.moc.h -o AddCustomQt.moc gcc412 -g -c -DUSE_GLEW -fPIC -msse -I/usr/local/Nuke6.3v7/include -I/mnt/42/profiles_linux/da_wa/Documents/nuke-qt-4.6.2-linux64/include -o AddCustomQt.os AddCustomQt.cpp gcc412 -L/usr/local/Nuke6.3v7 -shared -lDDImage -lQtGui -o AddCustomQt.so AddCustomQt.os cp *.so /mnt/42/profiles_linux/da_wa/.nuke" First I thought it was a compiler issue (or actually, that's sort of what I'm still guessing). I've been using GCC4.4 before because that's system default, and never really run into any problems with Nuke-plugins compilation before. Due to getting this problem, I've downloaded and compiled GCC4.1.2 to exactly match the Nuke environment. So, running "gcc412 --version" gives me: "gcc412 (GCC) 4.1.2 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." Any ideas what could be wrong here? Cheers, David -------------------------------------------------------------------------------- _______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
