Thanks mandrav
Here are the settings used by the project to re-compile the pluginwizard
(same for ClassWizard). I used absolute paths in an attempt to get
control of the problem (and to simplify).
[Project PluginWizard]
sources
enterinfodlg.cpp
pluginwizard.cpp
pluginwizarddlg.cp
Headers
enterinfodlg.h
pluginwizard.h
pluginwizarddlg.h
[Selected Compiler
GNU GCC Compiler
[Compiler]
Policy: blank
Compiler Flags
Enable all compiler warnings(overrides...)
Other options
blank
#defines
__GNUWIN32__
WXUSINGDLL
BUILDING_PLUGIN
[Linker]
Link libraries:
C:\Usr\CodeBlocks\codeblocks.dll
C:\Usr\CodeBlocks\wxscintilla.dll
C:\Usr\CodeBlocks\exchndl.dll
C:\Usr\CodeBlocks\wxmsw26_gcc_cb.dll
[Directories]
Compiler
C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\include
C:\Usr\codeblocks\codeblocks-1.0rc2-sdk\include\wxscintilla\include
C:\Usr\Proj\wxWidgets261\include <--wx/wxprec.h
C:\Usr\Proj\wxWidgets261\lib\gcc_dll\msw <--wx/setup.h
Linker
blank
Resource Compiler
blank
Commands
blank
Custom variables
blank
Thanks, Pecan
Ok, I cut this out of codeblocks.cbp from the rc2 src file.
Note that it was linked with 2.4.2. Is this what we should do?
I'm willing, I'm able. I'll do it if that's what it takes. BUT....
</Target>
<Target title="plugin_PluginsWizard">
<Option output="devel\share\CodeBlocks\plugins\pluginwizard.dll"/>
<Option working_dir="."/>
<Option object_output=".objs"/>
<Option deps_output=".deps"/>
<Option external_deps=""/>
<Option type="3"/>
<Option compiler="0"/>
<Option projectLinkerOptionsRelation="1"/>
<Option projectIncludeDirsRelation="2"/>
<Option projectLibDirsRelation="2"/>
<Compiler>
<Add option="-DBUILDING_PLUGIN"/>
<Add option="-D_WINDLL"/>
<Add directory="sdk"/>
</Compiler>
<Linker>
<Add option="-Wl,--enable-auto-image-base"/>
<Add option="-Wl,--add-stdcall-alias"/>
<Add library="libcodeblocks.a"/>
<Add library="libwxscintilla.a"/>
<Add library="libwxxrc.a"/>
<Add library="wxmsw242"/>
<Add directory="devel"/>
</Linker>
</Target>
thanks, Pecan
wups, or is this the right one ???
</Target>
<Target title="plugin_PluginsWizard">
<Option output="devel\share\CodeBlocks\plugins\pluginwizard.dll"/>
<Option working_dir="devel\share\CodeBlocks\plugins"/>
<Option object_output=".objs\2.6"/>
<Option deps_output=".deps"/>
<Option type="3"/>
<Option compiler="0"/>
<Option projectLinkerOptionsRelation="1"/>
<Option projectIncludeDirsRelation="2"/>
<Option projectLibDirsRelation="2"/>
<Compiler>
<Add option="-DBUILDING_PLUGIN"/>
<Add directory="sdk"/>
</Compiler>
<Linker>
<Add option="-Wl,--enable-auto-image-base"/>
<Add option="-Wl,--add-stdcall-alias"/>
<Add library="libcodeblocks.a"/>
<Add library="libwxscintilla.a"/>
<Add library="C:\Usr\Proj\wxWidgets261\lib\gcc_dll\wxmsw26_gcc_cb.dll"/>
<Add directory="devel"/>
</Linker>
</Target>
Pecan
[Linker]
Link libraries:
C:\Usr\CodeBlocks\codeblocks.dll
C:\Usr\CodeBlocks\wxscintilla.dll
C:\Usr\CodeBlocks\exchndl.dll
C:\Usr\CodeBlocks\wxmsw26_gcc_cb.dll
WHAT'S THIS?
You 're linking the DLLs directly? :shock: :?
Remove those and link the following:
libcodeblocks.a
libwxscintilla.a
libwxmsw26.a
Thanks mandrav
Here is my attempt to translate the src codeblocks.cbp to re-compiling
pluginwizard as a project:
?xml version="1.0"?>
<!DOCTYPE CodeBlocks_project_file>
<CodeBlocks_project_file>
<FileVersion major="1" minor="1"/>
<Project>
<Option title="PluginWizard"/>
<Option makefile="Makefile"/>
<Option makefile_is_custom="0"/>
<Option compiler="0"/>
<Build>
<Target title="default">
<Option output="pluginwizard.dll"/>
<Option working_dir="."/>
<Option object_output=".objs"/>
<Option deps_output=".deps"/>
<Option type="3"/>
<Option compiler="0"/>
</Target>
</Build>
<Compiler>
<Add option="-Wall"/>
<Add option="-D__GNUWIN32__"/>
<Add option="-DBUILDING_PLUGIN"/>
<Add directory="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\include"/>
<Add directory="c:\Usr\codeblocks\codeblocks-1.0rc2-sdk\include\wxscintilla\include"/>
<Add directory="C:\Usr\Proj\wxWidgets261\include"/>
<Add directory="C:\Usr\Proj\wxWidgets261\lib\gcc_dll\msw"/>
</Compiler>
<Linker>
<Add option="-Wl,--enable-auto-image-base"/>
<Add option="-Wl,--add-stdcall-alias"/>
<Add library="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\lib\libcodeblocks.a"/>
<Add library="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\lib\libwxscintilla.a"/>
<Add library="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\lib\libwxmsw26.a"/>
</Linker>
<Unit filename="enterinfodlg.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="enterinfodlg.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizard.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizard.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizarddlg.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizarddlg.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="default"/>
</Unit>
</Project>
</CodeBlocks_project_file>
These are the err I get:
roject : PluginWizard
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Usr\Proj\plugnwiz\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: pluginwizard.cpp
Compiling: pluginwizarddlg.cpp
Compiling: enterinfodlg.cpp
Linking dynamic library: pluginwizard.dll
Info: resolving _wxEmptyString by linking to __imp__wxEmptyString (auto-import)
Info: resolving wxStringBase::npos by linking to __imp___ZN12wxStringBase4nposE (auto-import)
Info: resolving _wxDefaultPosition by linking to __imp__wxDefaultPosition (auto-import)
Info: resolving vtable for wxMessageDialogby linking to __imp___ZTV15wxMessageDialog (auto-import)
Info: resolving wxDialog::sm_eventTable by linking to __imp___ZN8wxDialog13sm_eventTableE (auto-import)
Info: resolving vtable for wxDialogby linking to __imp___ZTV8wxDialog (auto-import)
Info: resolving vtable for wxDialogBaseby linking to __imp___ZTV12wxDialogBase (auto-import)
Info: resolving vtable for wxTopLevelWindowby linking to __imp___ZTV16wxTopLevelWindow (auto-import)
Info: resolving vtable for wxTopLevelWindowMSWby linking to __imp___ZTV19wxTopLevelWindowMSW (auto-import)
Info: resolving _wxEVT_UPDATE_UI by linking to __imp__wxEVT_UPDATE_UI (auto-import)
Info: resolving _wxEVT_COMMAND_BUTTON_CLICKED by linking to __imp__wxEVT_COMMAND_BUTTON_CLICKED (auto-import)
Info: resolving _wxEVT_COMMAND_TEXT_UPDATED by linking to __imp__wxEVT_COMMAND_TEXT_UPDATED (auto-import)
Info: resolving _wxEVT_NULL by linking to __imp__wxEVT_NULL (auto-import)
.objs\pluginwizard.o:pluginwizard.cpp:(.text$_ZN15wxMessageDialogD1Ev[wxMessageDialog::~wxMessageDialog()]+0xb): variable 'vtable for wxMessageDialog' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\pluginwizarddlg.o:pluginwizarddlg.cpp:(.text$_ZN8wxDialogC2Ev[wxDialog::wxDialog()]+0x4c): variable 'vtable for wxDialog' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\pluginwizarddlg.o:pluginwizarddlg.cpp:(.text$_ZN12wxDialogBaseD2Ev[wxDialogBase::~wxDialogBase()]+0xb): variable 'vtable for wxDialogBase' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\pluginwizarddlg.o:pluginwizarddlg.cpp:(.text$_ZN12wxDialogBaseC2Ev[wxDialogBase::wxDialogBase()]+0x4c): variable 'vtable for wxDialogBase' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\pluginwizarddlg.o:pluginwizarddlg.cpp:(.text$_ZN16wxTopLevelWindowD2Ev[wxTopLevelWindow::~wxTopLevelWindow()]+0xb): variable 'vtable for wxTopLevelWindow' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\pluginwizarddlg.o:pluginwizarddlg.cpp:(.text$_ZN16wxTopLevelWindowC2Ev[wxTopLevelWindow::wxTopLevelWindow()]+0x4c): variable 'vtable for wxTopLevelWindow' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\pluginwizarddlg.o:pluginwizarddlg.cpp:(.text$_ZN19wxTopLevelWindowMSWC2Ev[wxTopLevelWindowMSW::wxTopLevelWindowMSW()]+0x4c): variable 'vtable for wxTopLevelWindowMSW' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 11 seconds)
0 errors, 0 warnings
I smell "nearly" success again, after 4 days. An' that's pretty smelly :D
thanks, Pecan
mandrav
Thanks for the suggestion
I put WXUSINGDLL into the #defines. Pluginwizard compiled and
linked ok. But it still hangs C::B. the size of the dll is 191,515 bytes if
thats any importance. Here is the latest .cbp
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_project_file>
<CodeBlocks_project_file>
<FileVersion major="1" minor="1"/>
<Project>
<Option title="PluginWizard"/>
<Option makefile="Makefile"/>
<Option makefile_is_custom="0"/>
<Option compiler="0"/>
<Build>
<Target title="default">
<Option output="pluginwizard.dll"/>
<Option working_dir="."/>
<Option object_output=".objs"/>
<Option deps_output=".deps"/>
<Option type="3"/>
<Option compiler="0"/>
</Target>
</Build>
<Compiler>
<Add option="-Wall"/>
<Add option="-D__GNUWIN32__"/>
<Add option="-DBUILDING_PLUGIN"/>
<Add option="-DWXUSINGDLL"/>
<Add directory="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\include"/>
<Add directory="c:\Usr\codeblocks\codeblocks-1.0rc2-sdk\include\wxscintilla\include"/>
<Add directory="C:\Usr\Proj\wxWidgets261\include"/>
<Add directory="C:\Usr\Proj\wxWidgets261\lib\gcc_dll\msw"/>
</Compiler>
<Linker>
<Add option="-Wl,--enable-auto-image-base"/>
<Add option="-Wl,--add-stdcall-alias"/>
<Add library="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\lib\libcodeblocks.a"/>
<Add library="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\lib\libwxscintilla.a"/>
<Add library="C:\Usr\CodeBlocks\codeblocks-1.0rc2-sdk\lib\libwxmsw26.a"/>
</Linker>
<Unit filename="enterinfodlg.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="enterinfodlg.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizard.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizard.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizarddlg.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
</Unit>
<Unit filename="pluginwizarddlg.h">
<Option compilerVar=""/>
<Option compile="0"/>
<Option link="0"/>
<Option target="default"/>
</Unit>
</Project>
</CodeBlocks_project_file>
thanks
Pecan