c wxSmith and Code Blocks build error Stack Overflow

background image

Strona 1

c++ - wxSmith and Code::Blocks build error - Stack Overflow

2013-05-03 12:39:32

http://stackoverflow.com/questions/12035905/wxsmith-and-codeblocks-build-error

Tell me more

×

I recently started to work on GUI using wxSmith on Code::Blocks 10.05, and when I run the project, I
haven't written any code yet, just the OnClose function, and I when I build and run my project, I get 4
errors,

cannot find -lwxmsw28d_core

,

cannot find -lwxbase28d

,

cannot find -lwxpngd

,

and

cannot find -lwxzlibd

. The build log is:

--------------

Build

:

Debug

in gui

-

test

---------------

Compiling

:

gui_testMain

.

cpp

Linking

executable

:

bin\Debug\gui

-

test

.

exe

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxmsw28d_core

.

a when searching

for

-

lwxmsw28d_core

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

\libwxmsw28d_core

.

a when searching

for

-

lwxmsw28d_core

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxmsw28d_core

.

a when searching

for

-

lwxmsw28d_core

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

cannot find

-

lwxmsw28d_core

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxbase28d

.

a when searching

for

-

lwxbase28d

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

\libwxbase28d

.

a when searching

for

-

lwxbase28d

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxbase28d

.

a when searching

for

-

lwxbase28d

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

cannot find

-

lwxbase28d

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxpngd

.

a when searching

for

-

lwxpngd

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

\libwxpngd

.

a when searching

for

-

lwxpngd

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxpngd

.

a when searching

for

-

lwxpngd

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

cannot find

-

lwxpngd

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxzlibd

.

a when searching

for

-

lwxzlibd

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

\libwxzlibd

.

a when searching

for

-

lwxzlibd

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

skipping incompatible C

:

\SourceCode\Libraries\wxWidgets2

.

8

\lib\gcc_lib

/

libwxzlibd

.

a when searching

for

-

lwxzlibd

c

:/

mingw

/

bin

/../

lib

/

gcc

/

x86_64

-

w64

-

mingw32

/

4.7

.

0

/../../../../

x86_64

-

w64

-

mingw32

/

bin

/

ld

.

exe

:

cannot find

-

lwxzlibd

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no
registration required.

wxSmith and Code::Blocks build error

background image

Strona 2

c++ - wxSmith and Code::Blocks build error - Stack Overflow

2013-05-03 12:39:32

http://stackoverflow.com/questions/12035905/wxsmith-and-codeblocks-build-error

aizen92

452

3 14

3 Answers

collect2

.

exe

:

error

:

ld returned

1

exit status

Process

terminated with status

1

(

0

minutes

,

1

seconds

)

4

errors

,

0

warnings

What could be giving me the error? I'm using Code::Blocks on Windows. And I'm doing as a tutorial what
this link is doing

wxSmith Tutorial - Code::Blocks Wiki

NOTE: If it helps, I installed wxWidgets from wxPack, and in Code::Blocks, I made a Global Variable
using the Global Variable Editor, where the base field has

C:\SourceCode\Libraries\wxWidgets2.8

,

include field has

C:\SourceCode\Libraries\wxWidgets2.8\include

, and lib field has

C:

\SourceCode\Libraries\wxWidgets2.8\lib

. The rest of the fields are empty, like the obj (i couldnt find

obj folder), cflags, lflags, and user-defined fields are empty.

c++

windows

gui

wxwidgets

codeblocks

asked Aug 20 '12 at 10:20

Are you on a 64-bit computer but installed the 32-bit version, or the other way around? –

Joachim Pileborg

Aug

20 '12 at 10:23

I'm on 64-bit Windows, and in wxPack there wasn't 32-bit or 64-bit versions, only 1 file

wxpack.sourceforge.net/

Main/Downloads

aizen92

Aug 20 '12 at 10:27

Looks as if you did not compile the correct Debug version of wxWidgets.

Look at your ...\wxWidgets\build\msw folder, is there a folder like

gc_mwsud (unicode debug)
gc_mswuddll (unicode debug shared)

and in your case a folder

gcc_mswd (debug)
gcc_mswddll (debug shared)

EDIT

Only for your special case

go to x:\wxWidgets\build\msw\ ( x == your drive)

change your x:\wxWidgets\build\msw\config.gcc like

....

# C compiler

CC

=

gcc

# C++ compiler

CXX

=

g

++

....

# What type of library to build? [0,1]

SHARED

=

0

....

# Compile Unicode build of wxWidgets? [0,1]

UNICODE

=

0

....

# Type of compiled binaries [debug,release]

BUILD

?=

debug

....

# Multiple libraries or single huge monolithic one? [0,1]

MONOLITHIC

=

0

make with command. ONLY for your special case !!

background image

Strona 3

c++ - wxSmith and Code::Blocks build error - Stack Overflow

2013-05-03 12:39:32

http://stackoverflow.com/questions/12035905/wxsmith-and-codeblocks-build-error

moskito-x

2,147

2 5 17

VZ.

2,415

1 7 11

sourabh grover

4

2

x:\wxWidgets\build\msw>mingw32-make -f makefile.gcc

The normal way for the officially-supported Code::Blocks is

clean up the source:

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug clean

NOTE: Make sure you use exactly the same options for this step and for the build step below. The clean
target uses these variables and only cleans the specified version of the generated object and library files.
(It will not clean the intended files if these variables are not identical.)

NOTE: If you still have problems with compiling after cleaning, you could try to manually remove the gcc_
mswd directory under the build\msw directory. This directory is the place where the object files are stored.

When everything is clean you can start compiling wxWidgets:

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug

NOTE: These options are the officially-supported Code::Blocks options. If you want another version of
wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big
DLL) for linking Code::Blocks.

Patience. This step takes time. Make sure there was no compilation error before you continue.

http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_%
28MSW%29

edited

Aug 21 '12 at 15:49

answered Aug 21 '12 at 13:10

No, the only folders I have are: "vc_mswddll", "vc_mswdll", "vc_mswuddll", and "vc_mswudll" –

aizen92

Aug

21 '12 at 14:40

You must compile for gcc_lib with debug. Look at my EDIT –

moskito-x

Aug 21 '12 at 15:28

"Incompatible" almost certainly means that the library is a 32 bit file and you're using 64 bit compiler. Run

file

on both the library and one of the object files generated during your build from MinGW command

line to confirm this.

If this is correct, the solution would be to add

-m32

option to the compiler/linker command lines if they

really generate 64 bit code by default. Or maybe just get a 32 bit version of the compiler.

answered Aug 20 '12 at 11:28

How can I run

file

, and is MinGW command line different from the command prompt? –

aizen92

Aug 20

'12 at 12:13

I think you should have a shortcut to bash installed by MinGW/MSYS installation. And file should be available,
i.e. just "file name-of-the-file". –

VZ.

Aug 20 '12 at 13:27

Okay, I was able to open the MinGW command line, but what do you mean by

both library and one of

the object files generated during you build

? I'm kinda new to the whole bash commands and

MinGW. –

aizen92

Aug 20 '12 at 16:58

while making a new project just check the option that wxwidget is built as a monolithic library with use
wxwidget DLL option.! if already created project just add linker settings and compiler settings of the project
(properties)

answered Feb 25 at 8:25

background image

Strona 4

c++ - wxSmith and Code::Blocks build error - Stack Overflow

2013-05-03 12:39:32

http://stackoverflow.com/questions/12035905/wxsmith-and-codeblocks-build-error

Not the answer you're looking for? Browse other questions tagged

c++

windows

gui

wxwidgets

codeblocks

or

ask your own question

.


Wyszukiwarka

Podobne podstrony:
C# and C Beginning Visual C# 2010 Book Information and Code Download Wrox
Linux exploit writing tutorial part 1 Stack overflow
Novell iPrint Client Browser Plugin ExecuteRequest debug Parameter stack overflow
Microsoft Excel OBJ Record Stack Overflow
Novell iPrint Client Browser Plugin call back url stack overflow
Microsoft Office Visio DXF File stack overflow
Java CMM readMabCurveData stack overflow
Exploiting Stack Overflows in the Linux Kernel
Stack Overflow Automatic write() discovery
Kydland, Prescott Time to Build and Aggregate Fluctuations
A picnic table is a project you?n buy all the material for and build in a?y
ki power, korean bushido code and a martial arts technique potpourri unite in hwarangdo
ERROR CODE CZYLI SPIS ERRORów XBOX 360
Indesit Error Messages and Error Codes
PAT EI 65 Error Code List
How to build a USB device with PIC 18F4550 or 18F2550 (and the microchip CDC firmware)
11 6 1 1 Class?tivity ?sign and Build a Small Network Instructions
HANDOUT ERROR and?EDBACK TAXONOMY

więcej podobnych podstron