Author Topic: Using C::B...but problems  (Read 5519 times)

Offline sydbod

  • Single posting newcomer
  • *
  • Posts: 4
Using C::B...but problems
« on: October 10, 2007, 04:43:41 pm »
Sorry for these newbi questions but help would be appreciated.

We are a group of novices that are working on an old game code, and have been using VS6 VC6++.

We have no problems modifying the code and compiling it under VS6.

Windows XP environment.

The task was to use C::B as the IDE rather than the poorer VS6 IDE and see if we could work under this better environment.

We ripped out the ALT, Bin, Lib, MFC, Include folders from the VC6++ and inserted them into a desktop folder called "CodeBlocks".

We also included a relevant folder for the combined files for the SDK2005, SmackerSDK, GlideSDK, DX6SDK(yes it is very old code and required this).

We also brought across the game source code in its own folder into the "CodeBlocks" desktop folder.

The reason this was done, is that the project is a bit complex and we hoped to be able to just zip up a pre-configured "CodeBlocks" folder, and distribute it to the others (Yes the blind is leading the blind in this case). This should save me the massive problems I have been having getting people set up to work with the code at the present.

Questions:

1) Is it acceptable to specify paths for libraries etc in the form of ".\VC6plusLIBRARIES\Lib" rather than the full C:\Documents and Settings\user\Desktop\CodeBlocks\VC6plusLIBRARIES\Lib"

I am trying to make things as generic as I can without having to introduce full paths or environment variables.


2) I can compile the *.c files and the *.cpp files, but I see no way to integrate the "ML" assembler in the compile process. The configuration is just ignoring the *.asm files  in the compile phase.

Code
cl.exe /nologo  /W3 /GX /O2 /DWIN32 /DNDEBUG /D_WINDOWS /YX /G5 /Zp1 /MT /Zi /Ot /Oi /Oy /Ob2 /DGLIDE3_ALPHA /D_WIN32 /DWIN95 /D__MSC__ /FR /FD  /MT /G5 /GX /Ot /W1   /I"C:\Documents and Settings\user\Desktop\CodeBlocks\VC6plusLIBRARIES\EAW 2005 DX6 SDK" /I"C:\Documents and Settings\user\Desktop\CodeBlocks\VC6plusLIBRARIES\Include" /I"C:\Documents and Settings\user\Desktop\CodeBlocks\VC6plusLIBRARIES\MFC\Include" /I"C:\Documents and Settings\user\Desktop\CodeBlocks\VC6plusLIBRARIES\ATL\Include"  /c sim_misc.asm /Fo.\Release4\sim_misc.obj
Command line warning D4025 : overriding '/W3' with '/W1'
Command line warning D4021 : no action performed
Command line warning D4024 : unrecognized source file type 'sim_misc.asm', object file assumed
Command line warning D4027 : source file 'sim_misc.asm' ignored
Is there some solution, or do I have to preload the assembled object files for these *.asm files.

3)The object files for the compiled files are directed to the ".\Release4" folder and do arrive there with no problem.BUT...the linking does not find this folder when it tries to do its part.
Code
LINK:: fatal error LNK1181: cannot open input file ".\Release4\clipline.obj"
Is there any way to fix this or do I have to specify the full path?

Any help would be greatly appreciated :)

Regards sydbod

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: Using C::B...but problems
« Reply #1 on: October 10, 2007, 07:40:24 pm »
1) Is it acceptable to specify paths for libraries etc in the form of ".\VC6plusLIBRARIES\Lib" rather than the full C:\Documents and Settings\user\Desktop\CodeBlocks\VC6plusLIBRARIES\Lib"

I am trying to make things as generic as I can without having to introduce full paths or environment variables.

Let people keep the libraries where they normally do on their systems.  But use the CodeBlocks specific global variables (not OS env vars) so that the paths used in the project setting all reference those.  If you need an example you can look in the wiki at the compiler variables page, or you can just look at the codeblocks project itself.  It uses 2 variables, 'cb' and 'wx', which resolve to where your local installations of CodeBlocks and wxWidgets are respectively.

Offline sydbod

  • Single posting newcomer
  • *
  • Posts: 4
Re: Using C::B...but problems
« Reply #2 on: October 11, 2007, 12:25:47 am »
Ahhhhhhh...something like

"$(CODEBLOCKS)\VC6plusLIBRARIES\Lib"

This looks like one of the 3 problems may be solved.

Thanks for that one :)

EDIT: Yes using $(CODEBLOCKS) does give me the path to where the C::B exe is located, so this part works now.

Quote
3)The object files for the compiled files are directed to the ".\Release4" folder and do arrive there with no problem.BUT...the linking does not find this folder when it tries to do its part.
Is not a problem, the object files are actually found in that path by C::B. Have just confirmed this. It was the fact that the *.asm files were not assembled by ML that the *.obj files for these files could not be found.

Only problem left is how to integrate assembler into C::B so that the *.asm files also get worked on?
« Last Edit: October 11, 2007, 12:46:03 am by sydbod »

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: Using C::B...but problems
« Reply #3 on: October 11, 2007, 04:52:33 am »
Only problem left is how to integrate assembler into C::B so that the *.asm files also get worked on?

Sorry thats beyond me.  I've -never- dealt with assembly.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Using C::B...but problems
« Reply #4 on: October 11, 2007, 10:56:49 am »
Only problem left is how to integrate assembler into C::B so that the *.asm files also get worked on?
Sorry thats beyond me.  I've -never- dealt with assembly.

Still work-in-progress but have a look at this.
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: Using C::B...but problems
« Reply #5 on: October 11, 2007, 11:57:13 am »
.asm files can already be processed, normally the compiler can deal with them.
Add them to your project  --> they end up in Others ==> make sure the compile and link flag are set in the properties

Offline sydbod

  • Single posting newcomer
  • *
  • Posts: 4
Re: Using C::B...but problems
« Reply #6 on: October 11, 2007, 12:47:53 pm »
Hi killerbot,

To the best of my knowledge the C++ compiler from Microsoft VisualStudio 6 can not handle *.asm files, and worst luck we do require that non compliant compiler, otherwise we will have to update around 100+ files to work with the later versions (the small group of enthusiasts that I am working with are very green...and so am I... and this would currently be beyound them)

This is why we are using ML assembler, to handle the *.asm files.

It has been a very steep learning cure for us :)  but thanks for the reply.

Offline sydbod

  • Single posting newcomer
  • *
  • Posts: 4
Re: Using C::B...but problems
« Reply #7 on: October 11, 2007, 01:02:12 pm »
Still work-in-progress but have a look at this.

Thanks for that link.
I think I can work with that. I was almost thinking I would have to add in the *.asm obj files to the others before the Link process.

This is what was originally done with the *.asm files, But I see no reason why I can not just simplify the whole code base as the others are just scratching around with the release compile version of the code and making some small modifications.

EG:
Code
# Begin Source File

SOURCE=.\xyangle.asm

!IF  "$(CFG)" == "Game Code - Win32 Release"

# Begin Custom Build - MASM Release
OutDir=.\Release4
InputPath=.\xyangle.asm
InputName=xyangle

"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   ml.exe /c /Cp /coff /nologo /Fo$(OutDir)\$(InputName).obj $(InputPath)

# End Custom Build

!ELSEIF  "$(CFG)" == "Game Code - Win32 Debug"

# Begin Custom Build
OutDir=.\Debug4
InputPath=.\xyangle.asm
InputName=xyangle

"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   ml /c /Cp /coff /nologo /FR /Zi /Fo$(OutDir)\$(InputName).obj $(InputPath)

# End Custom Build

!ELSEIF  "$(CFG)" == "Game Code - Win32 Demo Release"

# Begin Custom Build - MASM Release
OutDir=.\Demo4
InputPath=.\xyangle.asm
InputName=xyangle

"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   ml.exe /c /Cp /coff /nologo /Fo$(OutDir)\$(InputName).obj $(InputPath)

# End Custom Build

!ELSEIF  "$(CFG)" == "Game Code - Win32 Demo German Release"

# Begin Custom Build - MASM Release
OutDir=.\Demo4G
InputPath=.\xyangle.asm
InputName=xyangle

"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   ml.exe /c /Cp /coff /nologo /Fo$(OutDir)\$(InputName).obj $(InputPath)

# End Custom Build

!ELSEIF  "$(CFG)" == "Game Code - Win32 German Master Debug"

# Begin Custom Build
OutDir=.\Game_Cod
InputPath=.\xyangle.asm
InputName=xyangle

"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   ml /c /Cp /coff /nologo /FR /Zi /Fo$(OutDir)\$(InputName).obj $(InputPath)

# End Custom Build

!ELSEIF  "$(CFG)" == "Game Code - Win32 German Master Release"

# Begin Custom Build - MASM Release
OutDir=.\Game_Co0
InputPath=.\xyangle.asm
InputName=xyangle

"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   ml.exe /c /Cp /coff /nologo /Fo$(OutDir)\$(InputName).obj $(InputPath)

# End Custom Build

!ENDIF

# End Source File

Thanks for all you help.