Author Topic: [RESOLVED] Compiling wxWidgets SHARED=0 used with CODEBLOCKS  (Read 11712 times)

Offline barbarello

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Compiling wxWidgets SHARED=0 used with CODEBLOCKS
« Reply #15 on: February 13, 2006, 10:39:14 pm »
You spend many time to help me  :oops:

@TIWAG

Here is the error (and many comes after depending of this file, i thing)
Quote
wx/setup.h: No such file or directory

@TDragon

Many errors and so more....

Quote
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_app.o):app.cpp:(.text+0x6d5): undefined reference to `InitCommonControls@0'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_app.o):app.cpp:(.text+0x6e1): undefined reference to `OleInitialize@4'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_app.o):app.cpp:(.text+0x90e): undefined reference to `OleUninitialize@0'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_window.o):window.cpp:(.text+0xa2d2): undefined reference to `_TrackMouseEvent@4'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_filename.o):filename.cpp:(.text+0x1805): undefined reference to `CoCreateInstance@20'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_filename.o):filename.cpp:(.text+0x1827): undefined reference to `IID_IPersistFile'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_statbr95.o):statbr95.cpp:(.text+0x16c): undefined reference to `CreateStatusWindowA@16'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_droptgt.o):droptgt.cpp:(.text+0x8e4): undefined reference to `CoLockObjectExternal@12'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_droptgt.o):droptgt.cpp:(.text+0x8fc): undefined reference to `RegisterDragDrop@8'
I:\wx\lib\gcc_lib/libwxmsw26.a(monolib_droptgt.o):droptgt.cpp:(.text+0x92e): undefined reference to `CoLockObjectExternal@12'

I compile wxWidget like this :

Quote
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=0

And now my parameters look like that

Quote
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
   <FileVersion major="1" minor="3" />
   <Project>
      <Option title="static" />
      <Option pch_mode="0" />
      <Option compiler="gcc" />
      <Build>
         <Target title="default">
            <Option output="wxwidgets_static.exe" />
            <Option type="0" />
            <Option compiler="gcc" />
            <Option includeInTargetAll="1" />
            <Option projectResourceIncludeDirsRelation="0" />
         </Target>
         <Environment>
            <Variable name="WX_CFG" value="u" />
            <Variable name="WX" value="I:\wx" />
         </Environment>
      </Build>
      <Compiler>
         <Add option="-pipe" />
         <Add option="-mthreads" />
         <Add option="-Winvalid-pch" />
         <Add option='-include &quot;wx_pch.h&quot;' />
         <Add option="-D__GNUWIN32__" />
         <Add option="-D__WXMSW__" />
         <Add option="-DUSE_PCH" />
         <Add directory="I:\wx\include" />
         <Add directory="I:\wx\contrib\include" />
         <Add directory="I:\wx\lib\gcc_lib\msw" />
         <Add directory="I:\wx\lib\gcc_lib\msw\wx" />
      </Compiler>
      <ResourceCompiler>
         <Add directory="I:\wx\include" />
      </ResourceCompiler>
      <Linker>
         <Add library="wxmsw26" />
         <Add directory="I:\wx\lib\gcc_lib" />
      </Linker>
      <Unit filename="main.cpp">
         <Option compilerVar="CPP" />
         <Option target="default" />
      </Unit>
      <Unit filename="wx_pch.h">
         <Option compilerVar="CPP" />
         <Option link="0" />
         <Option weight="0" />
         <Option target="default" />
      </Unit>
   </Project>
</CodeBlocks_project_file>



« Last Edit: February 13, 2006, 10:42:39 pm by barbarello »

Offline barbarello

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Compiling wxWidgets SHARED=0 used with CODEBLOCKS
« Reply #16 on: February 13, 2006, 10:52:05 pm »
I've made a copy of setup.h in include/wx and now get error :
Quote
cannot find -lwxmsw26d

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: Compiling wxWidgets SHARED=0 used with CODEBLOCKS
« Reply #17 on: February 13, 2006, 10:58:17 pm »
I've made a copy of setup.h in include/wx...
Not a good idea. Don't mess around with the structure of big libraries unless you know what you're doing. As long as you have <wxwidgets>/lib/gcc_lib/msw in your include paths, it should be able to find setup.h without trouble. "Cannot find -lwxmsw26d" means that you have that library somewhere in your list of libraries to link, where you shouldn't. (Unless you compiled the debug version of wxWidgets -- which you didn't.)

Lastly -- I was wrong in saying that the wx libs were all you needed; the ones that were in your list previously were also necessary. My apologies.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline barbarello

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Compiling wxWidgets SHARED=0 used with CODEBLOCKS
« Reply #18 on: February 13, 2006, 11:29:44 pm »
OK ! TIWAG it works now.

I used wxRelase target in Project properties and not in BUILD target....

It's OK, I have to read slowly this file and try to understand.

Big Big thanks to you guys !!

 :mrgreen: