Author Topic: Compiling error!  (Read 6943 times)

Offline daniel_ls

  • Single posting newcomer
  • *
  • Posts: 4
Compiling error!
« on: November 01, 2010, 04:07:04 pm »
When trying to compile a program, in C ++, appears an error message!

Code
-------------- Build: unix in ADM ---------------

Compiling: ADMApp.cpp
In file included from /usr/include/wx-2.8/wx/platform.h:293,
                 from /usr/include/wx-2.8/wx/defs.h:21,
                 from /usr/include/wx-2.8/wx/event.h:15,
                 from /usr/include/wx-2.8/wx/app.h:20,
                 from /home/daniel/Desktop/ADM 1.0 multiplataforma/ADMApp.h:13,
                 from /home/daniel/Desktop/ADM 1.0 multiplataforma/ADMApp.cpp:10:
/usr/include/wx-2.8/wx/chkconf.h:23: fatal error: wx/msw/chkconf.h: File or directory not found
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings

The IDE I use is the CodeBlocks 10.05 with the GUI libraries wxWidgets 2.8.

The CodeBlocks dont't find the file chkconf.h but when I do a manual search in the directory usr/include/wx-2.8/wx i see that it exists.

Help me, please.

Thank you...
C++ Programmer working to learn more about C++.<br />OS: Windows 7 / Ubuntu Linux 10.04.<br />Compiler: mingw gcc 4.4.<br />IDE: Code::Blocks + patches.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiling error!
« Reply #1 on: November 01, 2010, 04:17:05 pm »
1. it's not Code::Blocks, that does not find chkconf.h, it's your compiler (note: C::B is an IDE not a compiler),
2. your wxWidgets seems to be configured as windows-version, (wx)msw is the setup for windows, not for *nix-systems.

Either your wxWidgets-install is totally messed up or you have a totally misconfigured project or a misconfigure toolchain or you tried to tweak some of the wxWidgets-files manually.

How did you create your wxWidgets-project ?
Do you try to create a multi-platform project ?
Be sure you do not compile a windows project with linux wxWidgets, use wx-config on linux.


Offline daniel_ls

  • Single posting newcomer
  • *
  • Posts: 4
Compiling error!
« Reply #2 on: November 01, 2010, 04:35:29 pm »
I create a mult-plataform project, but i use in the build target `wx-config --cflags` and `wx-config --libs`.

I don't understanding when you saw:
Quote
your wxWidgets seems to be configured as windows-version, (wx)msw is the setup for windows, not for *nix-systems.

and

Quote
Either your wxWidgets-install is totally messed up or you have a totally misconfigured project or a misconfigure toolchain or you tried to tweak some of the wxWidgets-files manually.

How could I do to config wxWidgets as the linux version, since (wx) MSW is the configuration for Windows?
C++ Programmer working to learn more about C++.<br />OS: Windows 7 / Ubuntu Linux 10.04.<br />Compiler: mingw gcc 4.4.<br />IDE: Code::Blocks + patches.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiling error!
« Reply #3 on: November 01, 2010, 04:39:09 pm »
This
/usr/include/wx-2.8/wx/chkconf.h:23: fatal error: wx/msw/chkconf.h: File or directory not found
points to a (wx)msw-configuration !!

Check your defines, includes, options (also global options), etc.

Offline daniel_ls

  • Single posting newcomer
  • *
  • Posts: 4
Compiling error!
« Reply #4 on: November 01, 2010, 04:58:59 pm »
Thank you very much.

I found my mistake, but now he says the following.

What could it be?

Quote
Desktop / ADM 1.0 platform / ADMMain.cpp | 82 | error: converting to execution character set: invalid multibyte or wide character

i'm braziliam, and some words have accents, for example, água(water).
any problem?

in windows, it had none.
« Last Edit: November 01, 2010, 05:24:56 pm by daniel_ls »
C++ Programmer working to learn more about C++.<br />OS: Windows 7 / Ubuntu Linux 10.04.<br />Compiler: mingw gcc 4.4.<br />IDE: Code::Blocks + patches.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Compiling error!
« Reply #5 on: November 01, 2010, 06:32:03 pm »
You are having another Compiler Problem!
What compiler?
What version of the Compiler?

Turn on full compiler logging
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Find a website that supports your compiler and non-ASCII programming.

Please look on the Compiler Website for the status of its Unicode support.

Tim S.
« Last Edit: November 01, 2010, 06:42:56 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline daniel_ls

  • Single posting newcomer
  • *
  • Posts: 4
Re: Compiling error!
« Reply #6 on: November 02, 2010, 04:20:23 pm »
I found my mistake, but now my problem is this "auto-import".

Code
-------------- Build: windows in ADM ---------------

Compiling: ADMMain.cpp
Compiling: IDENTIFICACAO.cpp
Compiling: IDENTIFICACAOfunc.cpp
Compiling: TRATIMAGENS.cpp
Compiling: TRATIMAGENSfunc.cpp
Compiling: resource.rc
Compiling: ADMApp.cpp
Linking executable: windows\bin\ADM.exe
Info: resolving _wxEmptyString by linking to __imp__wxEmptyString (auto-import)
Info: resolving wxStringBase::npos       by linking to __imp___ZN12wxStringBase4nposE (auto-import)
Info: resolving vtable for wxObject by linking to __imp___ZTV8wxObject (auto-import)
Info: resolving vtable for wxListBase by linking to __imp___ZTV10wxListBase (auto-import)
Info: resolving vtable for wxGDIObject by linking to __imp___ZTV11wxGDIObject (auto-import)
Info: resolving vtable for wxFontBase by linking to __imp___ZTV10wxFontBase (auto-import)
Info: resolving vtable for wxFont by linking to __imp___ZTV6wxFont (auto-import)
Info: resolving _wxDefaultSize by linking to __imp__wxDefaultSize (auto-import)
Info: resolving vtable for wxColourBase by linking to __imp___ZTV12wxColourBase (auto-import)
Info: resolving vtable for wxColour by linking to __imp___ZTV8wxColour (auto-import)
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
Info: resolving vtable for wxWindow by linking to __imp___ZTV8wxWindow (auto-import)
Info: resolving vtable for wxControlBase by linking to __imp___ZTV13wxControlBase (auto-import)
Info: resolving vtable for wxControl by linking to __imp___ZTV9wxControl (auto-import)
Info: resolving vtable for wxStaticText by linking to __imp___ZTV12wxStaticText (auto-import)
Info: resolving vtable for wxwxMenuItemListNode by linking to __imp___ZTV20wxwxMenuItemListNode (auto-import)
Info: resolving vtable for wxMenuBase by linking to __imp___ZTV10wxMenuBase (auto-import)
Info: resolving vtable for wxMenu by linking to __imp___ZTV6wxMenu (auto-import)
Info: resolving vtable for wxStaticLine by linking to __imp___ZTV12wxStaticLine (auto-import)
Info: resolving vtable for wxRadioButton by linking to __imp___ZTV13wxRadioButton (auto-import)
Info: resolving vtable for wxPanel by linking to __imp___ZTV7wxPanel (auto-import)
Info: resolving vtable for wxButton by linking to __imp___ZTV8wxButton (auto-import)
Info: resolving vtable for wxFrame by linking to __imp___ZTV7wxFrame (auto-import)
Info: resolving vtable for wxStatusBar by linking to __imp___ZTV11wxStatusBar (auto-import)
Info: resolving wxFrame::sm_eventTable       by linking to __imp___ZN7wxFrame13sm_eventTableE (auto-import)
Info: resolving _wxDefaultPosition by linking to __imp__wxDefaultPosition (auto-import)
Info: resolving _wxDefaultValidator by linking to __imp__wxDefaultValidator (auto-import)
Info: resolving _wxEVT_COMMAND_BUTTON_CLICKED by linking to __imp__wxEVT_COMMAND_BUTTON_CLICKED (auto-import)
Info: resolving _wxEVT_COMMAND_MENU_SELECTED by linking to __imp__wxEVT_COMMAND_MENU_SELECTED (auto-import)
Info: resolving _wxEVT_CLOSE_WINDOW by linking to __imp__wxEVT_CLOSE_WINDOW (auto-import)
Info: resolving _wxEVT_NULL by linking to __imp__wxEVT_NULL (auto-import)
Info: resolving vtable for wxScrolledWindow by linking to __imp___ZTV16wxScrolledWindow (auto-import)
Info: resolving vtable for wxBookCtrlBase by linking to __imp___ZTV14wxBookCtrlBase (auto-import)
Info: resolving vtable for wxTextCtrlBase by linking to __imp___ZTV14wxTextCtrlBase (auto-import)
Info: resolving vtable for wxTextCtrl by linking to __imp___ZTV10wxTextCtrl (auto-import)
Info: resolving vtable for wxSplitterWindow by linking to __imp___ZTV16wxSplitterWindow (auto-import)
Info: resolving vtable for wxItemContainerImmutable by linking to __imp___ZTV24wxItemContainerImmutable (auto-import)
Info: resolving vtable for wxItemContainer by linking to __imp___ZTV15wxItemContainer (auto-import)
Info: resolving vtable for wxControlWithItems by linking to __imp___ZTV18wxControlWithItems (auto-import)
Info: resolving vtable for wxChoiceBase by linking to __imp___ZTV12wxChoiceBase (auto-import)
Info: resolving vtable for wxChoice by linking to __imp___ZTV8wxChoice (auto-import)
Info: resolving vtable for wxComboBox by linking to __imp___ZTV10wxComboBox (auto-import)
Info: resolving vtable for wxListbook by linking to __imp___ZTV10wxListbook (auto-import)
Info: resolving vtable for wxGDIImage by linking to __imp___ZTV10wxGDIImage (auto-import)
Info: resolving vtable for wxBitmap by linking to __imp___ZTV8wxBitmap (auto-import)
Info: resolving vtable for wxToolBar by linking to __imp___ZTV9wxToolBar (auto-import)
Info: resolving _wxNullBitmap by linking to __imp__wxNullBitmap (auto-import)
Info: resolving _wxEVT_PAINT by linking to __imp__wxEVT_PAINT (auto-import)
Info: resolving vtable for wxImage by linking to __imp___ZTV7wxImage (auto-import)
Info: resolving _wxConvUTF8 by linking to __imp__wxConvUTF8 (auto-import)
Info: resolving wxAppConsole::ms_appInitFn        by linking to __imp___ZN12wxAppConsole12ms_appInitFnE (auto-import)
Info: resolving wxAppConsole::ms_appInstance        by linking to __imp___ZN12wxAppConsole14ms_appInstanceE (auto-import)
Info: resolving vtable for wxCommandEvent by linking to __imp___ZTV14wxCommandEvent (auto-import)
Info: resolving _wxEVT_COMMAND_ENTER by linking to __imp__wxEVT_COMMAND_ENTER (auto-import)
Output size is 1,88 MB
Process terminated with status 0 (0 minutes, 41 seconds)
0 errors, 1 warnings
C++ Programmer working to learn more about C++.<br />OS: Windows 7 / Ubuntu Linux 10.04.<br />Compiler: mingw gcc 4.4.<br />IDE: Code::Blocks + patches.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Compiling error!
« Reply #7 on: November 02, 2010, 05:57:58 pm »
Code
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
Have you read the log carefully? Twice?
Then have you tried to paste the error in your search engine of choice?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]