User forums > Using Code::Blocks

[RESOLVED] Compiling wxWidgets SHARED=0 used with CODEBLOCKS

<< < (3/4) > >>

barbarello:
Errors and more errors.

Here is my file. I added everything i've found....I know it's ridiculous, but....

--- 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_u.exe" />
            <Option type="0" />
            <Option compiler="gcc" />
            <Option includeInTargetAll="1" />
            <Option projectResourceIncludeDirsRelation="0" />
         </Target>
         <Environment>
            <Variable name="WX_CFG" value="" />
         </Environment>
      </Build>
      <Compiler>
         <Add option="-pipe" />
         <Add option="-mthreads" />
         <Add option="-Winvalid-pch" />
         <Add option="-D__GNUWIN32__" />
         <Add option="-D__WXMSW__" />
         <Add option="-DwxUSE_UNICODE" />
         <Add directory="I:\wxWidgets-2.6.2\include" />
         <Add directory="I:\wxWidgets-2.6.2\include\wx" />
         <Add directory="I:\wxWidgets-2.6.2\contrib\include" />
         <Add directory="I:\wxWidgets-2.6.2\include\wx\msw" />
         <Add directory="I:\wxWidgets-2.6.2\build\msw\gcc_msw" />
      </Compiler>
      <ResourceCompiler>
         <Add directory="I:\wxWidgets-2.6.2\include" />
         <Add directory="I:\wxWidgets-2.6.2\include\wx" />
         <Add directory="I:\wxWidgets-2.6.2\include\wx\msw" />
         <Add directory="I:\wxWidgets-2.6.2\build\msw\gcc_msw" />
      </ResourceCompiler>
      <Linker>
         <Add library="wxmswu" />
         <Add library="winspool" />
         <Add library="winmm" />
         <Add library="shell32" />
         <Add library="comctl32" />
         <Add library="ctl3d32" />
         <Add library="odbc32" />
         <Add library="advapi32" />
         <Add library="wsock32" />
         <Add library="opengl32" />
         <Add library="glu32" />
         <Add library="ole32" />
         <Add library="oleaut32" />
         <Add library="uuid" />
         <Add directory="I:\wxWidgets-2.6.2\lib" />
         <Add directory="I:\wxWidgets-2.6.2\include\wx" />
         <Add directory="I:\wxWidgets-2.6.2\include\wx\msw" />
         <Add directory="I:\wxWidgets-2.6.2\build\msw\gcc_msw" />
      </Linker>
      <Unit filename="main.cpp">
         <Option compilerVar="CPP" />
         <Option target="default" />
      </Unit>
   </Project>
</CodeBlocks_project_file>
--- End quote ---

Michael:

--- Quote from: barbarello on February 13, 2006, 08:31:23 pm ---
--- Quote ---...
<Target title="default">
  <Option output="wxwidgets_static_u.exe" />
...

--- End quote ---

--- End quote ---

May be I am wrong but do you have set the output as .exe? It should be .a (static library) :?. You cannot have wxWidgets as .exe.

Michael

barbarello:
OK you are really nice guys !

I thanks you all

But it's boring me, and i will continue to works with DLL separatly.
I really understand anything of IDE compilating parameters (surely because it's not interest me  :lol: ).

Thanks for your replies :D

TDragon:

--- Quote from: Michael on February 13, 2006, 08:51:46 pm ---May be I am wrong but do you have set the output as .exe? It should be .a (static library) :?. You cannot have wxWidgets as .exe.

--- End quote ---
According to his first post, he's already successfully compiled wxWidgets, and is now trying to compile a program using wxWidgets.

barbarello, there are several things wrong I see in your project's options:

* WX_CFG is empty, but wxUSE_UNICODE is defined. If you're using a Unicode build of wxWidgets (you compiled wxWidgets with UNICODE=1), then WX_CFG should usually be set to "u". Conversely, if your wxWidgets build is not unicode, then you should delete the wxUSE_UNICODE line from your #defines.
* You're using some incorrect include and library directories. Your include directories should be "I:\wxWidgets-2.6.2\include", "I:\wxWidgets-2.6.2\contrib\include", "I:\wxWidgets-2.6.2\lib\gcc_lib\msw"; your library directory should be "I:\wxWidgets-2.6.2\lib\gcc_lib". If you're using a unicode build, use "mswu" instead of "msw". You don't need any other directories.
* You aren't linking with the wxWidgets static library. Add "wxbase26" and "wxmsw26" to your link libraries if you did the standard wxWidgets build, or "wxmsw26" if you did a monolithic wxWidgets build. You shouldn't need any of the other libraries you have.
Cheers,
JohnE

tiwag:
@barbarello

give the attached project a try, it should build quite nice (at least it does for me)
if your wx-widgets directory is "I:\wxWidgets-2.6.2"

build the wxRelease target only, if you don't have a debug-version of wxWidgets.

good luck, tiwag

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version