User forums > General (but related to Code::Blocks)

Adding assembler as a compiler

<< < (3/4) > >>

sparhawk:

--- Quote from: stahta01 on March 22, 2014, 05:08:18 pm ---I was thinking that was needed to get rid of the options; but, it did NOT seem to be true.

--- End quote ---

Yes, for the options it is not needed. Do you know where the includes are setup? I still have AVR paths in my commandline, where I don't know where they come from. Linker and assembler.


--- Code: ---ml.exe /IC:\MASM32\avr\include
LINK.exe /LC:\MASM32\avr\lib

--- End code ---

stahta01:
Could be XML file; without knowing which XML you copied and how you modified it I have no way to tell.

Tim S.

sparhawk:
I used the avr-gcc file. I removed all references but I don't see where this comes from.

Compiler

--- Code: ---<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_compiler>
<CodeBlocks_compiler name="MASM 32/64"
                     id="masm"
                     weight="60">
    <Path type="master">
        <Search envVar="PATH"
                for="ml.exe"/>
        <if platform="windows">
            <Search path="C:\MASM32"/>
            <Fallback path="C:\MASM32"/>
        </if>
        <if platform="windows">
            <Search path="D:\MASM32"/>
            <Fallback path="D:\MASM32"/>
        </if>
    </Path>
<Path type="include">
<Add><master/>\include</Add>
</Path>
<Path type="lib">
<Add><master/>\lib</Add>
</Path>
</CodeBlocks_compiler>

--- End code ---

Options

--- Code: ---<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_compiler_options>
<CodeBlocks_compiler_options>
    <if platform="windows">
        <Program name="ASM"       value="ml.exe"/>
        <Program name="LD"        value="LINK.exe"/>
        <Program name="DBGconfig" value="gdb_debugger:Default"/>
        <Program name="LIB"       value="LINK.exe"/>
        <Program name="WINDRES"   value="windres.exe"/>
        <Program name="MAKE"      value="mingw32-make.exe"/>
    </if>

    <Switch name="includeDirs"             value="/I"/>
    <Switch name="libDirs"                 value="/L"/>
    <Switch name="linkLibs"                value="-l"/>
    <Switch name="defines"                 value="/D"/>
    <Switch name="genericSwitch"           value="/"/>
    <Switch name="objectExtension"         value="obj"/>
    <Switch name="needDependencies"        value="true"/>
    <Switch name="forceCompilerUseQuotes"  value="false"/>
    <Switch name="forceLinkerUseQuotes"    value="false"/>
    <Switch name="logging"                 value="default"/>
    <Switch name="libPrefix"               value="lib"/>
    <Switch name="libExtension"            value="a"/>
    <Switch name="linkerNeedsLibPrefix"    value="false"/>
    <Switch name="linkerNeedsLibExtension" value="false"/>
    <Switch name="supportsPCH"             value="true"/>
    <Switch name="PCHExtension"            value="gch"/>
    <Switch name="UseFullSourcePaths"      value="true"/>

    <!-- Summary of MASM options: -->

    <Option name="Produce debugging symbols"
            option="/MZ"
            category="Debugging"
            checkAgainst=""
            checkMessage="You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."
            supersedes=""/>
    <Option name="Generate COFF format (not available for x64) required for Win32"
            option="/coff"
            category="Debugging"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Generates line-number information in object file."
            option="/Zd"
            category="Debugging"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Generates CodeView information in object file."
            option="/Zi"
            category="Debugging"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>

    <!-- warnings -->
    <Option name="Warning Level 0 and report an error if warnings exist"
            option="/w"
            category="Warning level"
            checkAgainst=""
            checkMessage=""
exclusive="true"
            supersedes=""/>
    <Option name="Warning Level 0"
            option="/W 0"
            category="Warning level"
            checkAgainst=""
            checkMessage=""
exclusive="true"
            supersedes=""/>
    <Option name="Warning Level 1"
            option="/W 1"
            category="Warning level"
            checkAgainst=""
            checkMessage=""
exclusive="true"
            supersedes=""/>
    <Option name="Warning Level 2"
            option="/W 2"
            category="Warning level"
            checkAgainst=""
            checkMessage=""
exclusive="true"
            supersedes=""/>
    <Option name="Warning Level 3"
            option="/W 3"
            category="Warning level"
            checkAgainst=""
            checkMessage=""
exclusive="true"
            supersedes=""/>
    <Option name="Warning Level 4"
            option="/W 4"
            category="Warning level"
            checkAgainst=""
            checkMessage=""
exclusive="true"
            supersedes=""/>

    <!-- symbols -->

    <Option name="Preserves case of all user identifiers."
            option="/Cp"
            category="Symbols"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Maps all identifiers to upper case (default)."
            option="/Cu"
            category="Symbols"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Preserves case in public and extern symbols."
            option="/Cx"
            category="Symbols"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Makes all symbols public."
            option="/Zf"
            category="Symbols"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>

    <!-- Listing -->
    <Option name="Turns on listing of all available information."
            option="/Sa"
            category="Listing"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Adds first-pass listing to listing file."
            option="/Sf"
            category="Listing"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Turns off symbol table when producing a listing."
            option="/Sn"
            category="Listing"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Turns on false conditionals in listing."
            option="/Sx"
            category="Listing"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Generates a preprocessed source listing (sent to STDOUT). See /Sf."
            option="/EP"
            category="Listing"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>

    <!-- Language -->
    <Option name="Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as OPTION LANGUAGE:PASCAL."
            option="/Gc"
            category="Language"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Specifies use of C-style function calling and naming conventions. Same as OPTION LANGUAGE:C."
            option="/Gd"
            category="Language"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Specifies use of __stdcall function calling and naming conventions. Same as OPTION LANGUAGE:STCALL."
            option="/GZ"
            category="Language"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>

    <!-- Misc -->
    <Option name="Generates emulator fix-ups for floating-point arithmetic (mixed language only)."
            option="/FPi"
            category="Misc"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Marks the object as either containing no exception handlers or containing exception handlers that are all declared with .SAFESEH."
            option="/safeseh"
            category="Misc"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Ignore INCLUDE environment path."
            option="/X"
            category="Misc"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>
    <Option name="Enables M510 option for maximum compatibility with MASM 5.1."
            option="/Zm"
            category="Misc"
            checkAgainst=""
            checkMessage=""
            supersedes=""/>

    <Command name="CompileObject"
             value="$compiler /nologo $options $includes /Fo $object /c $file "/>
    <Command name="CompileResource"
             value="$rescomp $res_includes -fo$resource_output $file"/>
    <Command name="LinkExe"
             value="$linker /nologo /subsystem:windows $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
    <Command name="LinkConsoleExe"
             value="$linker /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
    <Command name="LinkDynamic"
             value="$linker /dll /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
    <Command name="LinkStatic"
             value="$lib_linker /lib /nologo $libdirs /out:$static_output $libs $link_objects $link_resobjects $link_options"/>
    <Command name="LinkNative"
             value="$linker /nologo /subsystem:native $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
</CodeBlocks_compiler_options>

--- End code ---

stahta01:
Here's the code that likely does it.

--- Code: ---    </Path>
<Path type="include">
<Add><master/>\include</Add>
</Path>
<Path type="lib">
<Add><master/>\lib</Add>
</Path>

--- End code ---

sparhawk:
Ah, I found it. Apparently I set it manually in the global compiler settings and forgot about it. :o

So now it works. :D Almost. :o

Can I also set additional options in the wizard? I would like to to automatically switch on COFF format, and debugging in the Debug build, as well as adding kernel32.lib as default library.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version