The MASM Forum Archive 2004 to 2012

Project Support Forums => IDE Development and Support => Easy Code => Topic started by: Danesh on March 15, 2005, 06:18:21 PM

Title: Adding .lib and .inc files
Post by: Danesh on March 15, 2005, 06:18:21 PM
Hi all,

I have created a visual project in EasyCode, but I need to add user32, kernel32 and wsock32 .inc and .lib files into my project. When I add them to my project and assemble it, I get this error:

============== Project1 - Debug ==============

Compiling resources...
Assembling: Module1
MACROS.ASM(815) : error A2005: symbol redefinition : select

Errors ocurred.


Why this happen ? Anybody help ?

Thanks,

Danesh

Title: Re: Adding .lib and .inc files
Post by: Mark Jones on March 15, 2005, 07:15:14 PM
Hi Danesh, have you added your includes via Project --> Add include/lib file? I think Easycode automatically includes most of these, here is a list from the EasyCode help:

Quote
Easy Code visual mode always includes the following MASM32 inc and lib files from its subdirectories INCLUDE and LIB:

windows.inc

gdi32.inc
kernel32.inc
user32.inc
comctl32.inc
advapi32.inc

gdi32.lib
kernel32.lib
user32.lib
comctl32.lib
advapi32.lib

Regards,
Mark
Title: Re: Adding .lib and .inc files
Post by: Danesh on March 15, 2005, 07:19:05 PM
Hi Mark,

Yes, I used  Project --> Add include/lib file, but it doesn't work.

Danesh

Title: Re: Adding .lib and .inc files
Post by: Ramon Sala on March 15, 2005, 09:28:39 PM
Hi Danesh,

As Mark has explained perfectly well, all the .inc and .lib files he has listed are included internally by Easy Code (ONLY IN VISUAL PROJECTS). That's the reason why it ignores them when you try to load them, but they are included, so you cannot have any error for that. Anyway, in future versions and in order to avoid confusions, I'll make them to appear in the Include and Lib folders of the Project Explorer if the user loads them.

The reason why they are included is that they are needed for the visual library to have all its functions, properties and methods.

Regards,

Ramon
Title: Re: Adding .lib and .inc files
Post by: Danesh on March 15, 2005, 09:57:59 PM
Hi,

Actually it didn't ignore when I added for example kernel32.inc and kernel32.lib, however they were added already. But the problem was in MACROS.ASM file and not the EasyCode. I downloaded latest version of MACROS.ASM  Masm forum-->Project Support forums -->MASM32, in the New version of MACROS.ASM dated 6th January 2005 and now it works.

Thanks,

Danesh

Title: Re: Adding .lib and .inc files
Post by: pbrennick on March 15, 2005, 10:55:04 PM
 Compiling resources...
Assembling: Module1
MACROS.ASM(815) : error A2005: symbol redefinition : select

Yep, pretty much a nobrainer on this one.  :U :U

Paul
Title: Re: Adding .lib and .inc files
Post by: Ramon Sala on March 16, 2005, 06:48:00 AM
Hi,

For those who work with winsock functions (wsock32.inc/wsock32.lib), take into account the following:

The last version of MASM32 includes a macro named select (in MACROS.ASM file). As this is the name of a winsock function, errors are generated at compile time. Hucth is aware of that and he will fix it for next versions of MASM32. Meanwhile, he has posted the right MACROS.ASM file in Project support forums-->MASM32 (New version of MACROS.ASM dated 6th January 2005 topic). You should download it and replace the wrong MACROS.ASM file.

Ramon
Title: Re: Adding .lib and .inc files
Post by: LogicRules on July 03, 2007, 04:36:31 AM
I am trying to learn assembly but I am having a problem in Easycoder. I seems that some include files can be placed in the project include file section but others cannot.
I was running the hello world pgm, and I wanted the CLS function to work I placed the "Include   \masm32\include\masm32.inc\" in the code it worked OK. So I decided to try placing it in the project include section, and all went well.

Another include file " \masm32\include\masm32rt.inc" is in the code but when I try to place it in the project section it gives me a slew of errors.
While I get a warning on masm32.inc the removal of masn32rt.inc in the code fails completely.

What's the scoop on this?   :dazzled:  Any help will be appreciated. TX


; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
Include \masm32\include\masm32rt.inc
Include \masm32\include\masm32.inc\
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    .code

start:
    call main
    inkey
    exit

main proc
    cls
    print " ",10, "Hello World",10,10

    ret

main endp

end start



I noticed you say that future updates will solve some of these problems. Will this apply to my problem?
---This is a repost from MASM Forum Campus---
Title: Re: Adding .lib and .inc files
Post by: LogicRules on July 04, 2007, 04:11:45 AM
Thank you Ramon,
I will downlod the file, and see how far I get from there.
I am not a purist, as many of you are, but an individual trying to keep the grey matter moving ay 67, between BUDS.
Telling something what to do is of primary concern to me after three wives.  :dance:
Who knows, I might even get to learn some of this stiff.
TX
Title: Re: Adding .lib and .inc files
Post by: Ramon Sala on July 04, 2007, 07:58:15 AM
Hi LogicRules,

Thank you for using Easy Code.

The best you can do with all include and library files not belonging to MASM32, is placing them in the project directory. Then, you can add them to project by using the 'Project->Add->Include file...' or 'Project->Add->Library file...' options, rather than including them in the source code. This way, everything should work fine.

Regards,

Ramon
Title: Re: Adding .lib and .inc files
Post by: LogicRules on July 05, 2007, 06:04:04 AM
Hi Ramon,
Thanks for the tip. I will give it a try, and see how it goes.