Author Topic: compiler issues  (Read 17661 times)

xLordRADx

  • Guest
compiler issues
« on: March 22, 2007, 06:40:27 am »
I'm having several problems.

1.
When I compile using the rev3736 I get this: "hw7-2 - Release" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping..." where hw7-2 is my project name.

I have CB searching for the GNU GCC Compiler in both the CB folder and a folder containing a manual installation of MiniGW. I've tried telling it search directly in the "bin" folders as well where I can see the mingw32-g++.exe among others in Windows Explorer. So, what am I doing wrong here?

2.
When I create a project in rev3736, the wizard gives me a choice between debug and/or  release configurations. What does this mean? Sorry if this is a noob question.

3.
When I load the "stable" release of CB, I get the error: "Execution of command 'svn.exe' failed (error 2: the system cannot find the file specified.)" What does this mean and/or how can I fix it?

4. I don't remember what build I had, but before I upgraded to rev3736, my program was compiling (getting errors), but (once I fixed the errors) wasn't generating the binary executable file. I was getting a message with the address to the minigw folder, the address to my program, and the message: "mingw32-g++.exe: no input files." As I cannot even compile right now with the new build (or my stable build for that matter), I don't know if this is still an issue, but it likely is. Advice would be appreciated.

Thank you all in advance.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: compiler issues
« Reply #1 on: March 22, 2007, 07:25:21 am »
I'm having several problems.

1.
When I compile using the rev3736 I get this: "hw7-2 - Release" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping..." where hw7-2 is my project name.

I have CB searching for the GNU GCC Compiler in both the CB folder and a folder containing a manual installation of MiniGW. I've tried telling it search directly in the "bin" folders as well where I can see the mingw32-g++.exe among others in Windows Explorer. So, what am I doing wrong here?

Try right clicking on project, pick "Build Options", verify that the correct compiler is selected, Click on OK.
Say yes if it asks to set targets.

2.
When I create a project in rev3736, the wizard gives me a choice between debug and/or  release configurations. What does this mean? Sorry if this is a noob question.

A debug version of a program normally is compiled so it works better with the debugger; things like symbols and use of debugger libraries are common. The release version is often striped of symbols to make it a smaller file.

3.
When I load the "stable" release of CB, I get the error: "Execution of command 'svn.exe' failed (error 2: the system cannot find the file specified.)" What does this mean and/or how can I fix it?

You need to install svn client. I suggest using subversion from http://subversion.tigris.org/project_packages.html
In addition, I also install tortoisesvn from http://tortoisesvn.tigris.org/; this is a easy to use GUI Client but it does NOT supply an svn.exe

4. I don't remember what build I had, but before I upgraded to rev3736, my program was compiling (getting errors), but (once I fixed the errors) wasn't generating the binary executable file. I was getting a message with the address to the minigw folder, the address to my program, and the message: "mingw32-g++.exe: no input files." As I cannot even compile right now with the new build (or my stable build for that matter), I don't know if this is still an issue, but it likely is. Advice would be appreciated.

Thank you all in advance.

Turn on full compiler logging by
"Settings" -> "Compiler and Debugger"
Verify your compiler is selected (if it is the only compiler you use make sure it is the default by clicking on "Set Default")
Select "Other Settings"
Change "Compiler Logging" to "Full command Line"
Click on "OK"

Tim S
« Last Edit: March 22, 2007, 07:37:15 am 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

xLordRADx

  • Guest
Re: compiler issues
« Reply #2 on: March 22, 2007, 07:42:28 pm »
1. If I'm using the MinGW compiler, which do I select in the list? GNU GCC? Because that's what I'm using when I get ""Console application - default" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping..."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: compiler issues
« Reply #3 on: March 22, 2007, 07:53:40 pm »
what's the compiler specified in he release target in your build options ?

xLordRADx

  • Guest
Re: compiler issues
« Reply #4 on: March 26, 2007, 01:18:04 am »
I'm not sure what you mean. Where do I find the release target? When I open build options and go to search directories I have "C:\Program Files\MinGW\bin".

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: compiler issues
« Reply #5 on: March 26, 2007, 01:27:33 am »
I'm not sure what you mean. Where do I find the release target? When I open build options and go to search directories I have "C:\Program Files\MinGW\bin".

What is the path of you MinGW Installation?
If it is, "C:\Program Files\MinGW", please change it to a path without spaces. The standard path is "C:\MinGW", I use "C:\apps\MinGW" myself.
Too many things do NOT work with spaces in the path.

Tim S
« Last Edit: March 26, 2007, 01:29:44 am 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

xLordRADx

  • Guest
Re: compiler issues
« Reply #6 on: March 26, 2007, 02:11:21 am »
Well, I just added "D:\Main\Programming\CodeBlocksNightly\bin" as the compiler, linker and resource compiler search directory for default and the project. I still get the same error, ""Console application - default" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done."

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: compiler issues
« Reply #7 on: March 26, 2007, 02:28:40 am »
Well, I just added "D:\Main\Programming\CodeBlocksNightly\bin" as the compiler, linker and resource compiler search directory for default and the project. I still get the same error, ""Console application - default" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done."

That is the wrong place or wrong value!!

What is your minGW installation folder?

Did you install MinGW?

I am still willing to help you, but you MUST answer my questions on your setup!

If, you do not want to do that here is the WiKi Info:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Windows

Assuming your MinGW Installation Directory is "C:\MinGW"


Verify it is Correctly set under
"Settings" -> "compiler and debugger"
Make sure "Selected Compiler" Says "GNU GCC Compiler"
Select "Toolchain Executable" as the setting to change.
Verify that the "Compiler's Installation Directory" is "C:\MinGW"
Select "Search Directories" as the setting to change.
Delete the values under "Compiler", "Linker" and "Resource Compiler"
Click OK
Exit out of Code::Blocks

Reenter code::blocks

"Settings" -> "compiler and debugger"
Make sure "Selected Compiler" Says "GNU GCC Compiler"
Select "Search Directories" as the setting to change.
Verify that the correct values are in "Compiler", "Linker" and "Resource Compiler".
"Compiler"
  C:\MinGW\include
"Linker"
  C:\MinGW\lib
"Resource Compiler"
  C:\MinGW\include

Tim S
« Last Edit: March 26, 2007, 03:11:10 am 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

xLordRADx

  • Guest
Re: compiler issues
« Reply #8 on: March 26, 2007, 07:24:43 am »
Following those steps fixed it perfectly. Thank you very much. :)

As for where MinGW was installed, it is located in the Code::Blocks directory mentioned in my last post. I also performed a seperate manual installation of it in C:/Program Files/MinGW/. I switched the search directory to the former because you said spaces can cause problems. Sorry for the confusion.

xLordRADx

  • Guest
Re: compiler issues
« Reply #9 on: March 26, 2007, 07:38:01 am »
When C::B runs, does it search for the latest required files within it's parent directory, or just the files with the proper name in the home directory. In other words, I'm wondering if I make seperate folders directly under the main C::B folder for the files of each nightly build, will it run expectedly?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: compiler issues
« Reply #10 on: March 26, 2007, 08:51:54 am »
When C::B runs, does it search for the latest required files within it's parent directory, or just the files with the proper name in the home directory. In other words, I'm wondering if I make seperate folders directly under the main C::B folder for the files of each nightly build, will it run expectedly?

It should run properly;as long as you only run one copy at a time. If you run two, I have no idea on how it will save their configs. Note, if you wish to run two you should set each of them to a different config name.

Here's a snippet of how I call my CB "codeblocks.exe --debug-log  --personality=svnprod  --no-check-associations --no-dde"

The "--personality=svnprod" part results in the config file svnprod.conf being used instead of default.conf.


There is mainly 2 directories involved in CB not counting the Compilers, Includes and Libraries
1. CB Application Directory
2. CB Config Directory (note this can be the same as the CB Application Directory except some CB Plugins crash, to do this search forum for USB or Portable codeblocks)

CB Application has to be a separate folder for each nightly, it is normal to copy the wxWidgets and MinGW DLL to this folder.
( I have been told that you can place the MinGW DLL "mingwm10.dll" in your path and not have to copy it to each folder.)
( This should also work for the wxWidgets DLL, But I have never done either one; This is because I have multiple different copies of both DLLs, if I put either in the path the results would be a problem because it might use the wrong DLL.)

The CB Config Directory defaults to %APPDATA%\codeblocks

Tim S
 

« Last Edit: March 26, 2007, 09:00:53 am 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 Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: compiler issues
« Reply #11 on: March 26, 2007, 08:55:56 am »
Install MinGW to C:\MinGW directory. That is basically standard. You can put it inside any directory, but that will probably cause more problems. ;)
« Last Edit: March 26, 2007, 08:57:41 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline ganeshram

  • Single posting newcomer
  • *
  • Posts: 2
Re: compiler issues
« Reply #12 on: October 01, 2023, 08:20:09 pm »
@xLordRadX,

How you tell CB to search in bin folder