Author Topic: MSVC Extraneous -Wno-attributes on call to CL from Code Blocks IDE  (Read 8639 times)

Offline pauloxley

  • Single posting newcomer
  • *
  • Posts: 3
I am new to Code Blocks and have been trying to get it to work with MSVC 2008 with Code Blocks IDE. I successfully downloaded and compiled wxWidgets-2.9.5 with the command line make file and MSVC. It appears that MSVC is generating all of the needed libraries. I have tried reinstalling Code Blocks from the binary setup program.

When I open Code Blocks using an existing project that works on another parties computer (Using minGW/GCC), the first module of a REBUILD generates the following message:

cl.exe /nologo -Wall -Wno-attributes -DWINVER=0x0500 -D_WIN32_WINNT=0x0500  -g -static -DWIN32    /ILogic\include /ILogic /IGUI /IGUI\glew /ILogic\dependencies /ILogic\include /ILogic\dependencies\CyAPI /ILogic\dependencies\fftw-3.3.3 /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" /IC:\wxWidgets-2.9.5_VC\lib\vc_lib\mswu\ /IC:\wxWidgets-2.9.5_VC\include\msvc\  /c Logic\ctr_6002dr2_LogicDLL.cpp /Foobj\Debug\logic\Logic\ctr_6002dr2_LogicDLL.obj
cl : Command line error D8021 : invalid numeric argument '/Wno-attributes'
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)

I have tried resetting the compiler(it finds the MSVC compiler) and have changed the directory searches to find the correct headers. Am I doing something else wrong?

I also tried using minGW/GCC but it doesn't build all of the libraries for wxWidgets. I would prefer to use MSVC if we can make it work.

Paul
 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: MSVC Extraneous -Wno-attributes on call to CL from Code Blocks IDE
« Reply #1 on: October 02, 2013, 10:29:00 pm »
I also tried using minGW/GCC but it doesn't build all of the libraries for wxWidgets. I would prefer to use MSVC if we can make it work.
1. make sure compiling with VC++ works, try it with a simple console project (make sure you use the msvc template, not the gcc compiler)
2. make sure you've setup your project/target to use VC++ compiler, not GCC
3. remove any left flags that are GCC only

If this project will be shared between GCC/VC++ probably it is a good idea to have one target per compiler per project.
(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!]

Offline pauloxley

  • Single posting newcomer
  • *
  • Posts: 3
Re: MSVC Extraneous -Wno-attributes on call to CL from Code Blocks IDE
« Reply #2 on: October 03, 2013, 02:35:21 am »
MSVC works - It was used to do the make on the wxWidgets Libraries. All of the libraries were created. In addition, it has been in use on other projects using both the command line and the MS Visual Studio IDE. It has compiled C and C++.

The project (with a large number of modules) is being migrated to allow the addition of features to the existing code for use in a different not for profit organization. Thus we don't know of an easy way to create new targets. The existing project and default settings were all changed to the new compiler and search directories The compiler was reset to default. The MSVC compiler was set as the new default compiler. The project was renamed to be able to produce a different executable name.

The flags were all reset to unchecked in the IDE when the compiler was reset to defaults. This was done on both the Settings (Global) and Project - Build Options screens. The project was saved. The default configuration may have been saved, but I don't remember being asked this time. The save all files was done before exiting Code Blocks.

I am also using Windows 7 64 bit. Does this offer anything unique? The desired build is for a X86 target. I am running Code Blocks as an administrator via the right click method. Code Blocks is installed in C:\codeblocks. wxWidgets is installed in c:\wxWidgets-2.9.5_VC. VC is installed in its native directory Program Files (X86). The path environment variable was modified to add a path for wxWidgets and VC. It doesn't have any entries for Code Blocks. Is it needed?

Paul

Is there some other place that could be holding the old flags from the previous use on GCC?

Paul

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7790
    • My Best Post
Re: MSVC Extraneous -Wno-attributes on call to CL from Code Blocks IDE
« Reply #3 on: October 03, 2013, 03:26:39 am »

Is there some other place that could be holding the old flags from the previous use on GCC?

Paul

Yes, in the Compiler other option area. Or the linker option area in both the Project and Global setting places.

Edit Finished.
1. "Project" -> "Build Options"
[Check top target and all other target in left window one at a time]
Tab "Compiler Settings" Sub-Tab "Other Options"
Tab "Linker Settings" Sub-Tab "Other Linker Options"

2. "Settings" -> "Compiler" [Global Compiler Settings]
Tab "Compiler Settings" Sub-Tab "Other Options"
Tab "Linker Settings" Sub-Tab "Other Linker Options"


Edit2: Feel free to update the Wiki with this answer; I suggest here would work. http://wiki.codeblocks.org/index.php?title=FAQ-Settings
I have forgotten the little Wiki formatting how to I once knew; every thing I add looks ugly.
The Wiki uses the same username/password as here.


Tim S.
« Last Edit: October 03, 2013, 03:42:46 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: MSVC Extraneous -Wno-attributes on call to CL from Code Blocks IDE
« Reply #4 on: October 03, 2013, 09:49:29 am »
MSVC works - It was used to do the make on the wxWidgets Libraries. All of the libraries were created. In addition, it has been in use on other projects using both the command line and the MS Visual Studio IDE. It has compiled C and C++.
I meant if it works inside C::B
(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!]