metrowerks codewarrior and dlls

This is a discussion on metrowerks codewarrior and dlls within the Windows Programming forums, part of the Platform Specific Boards category; does anyone use metroweks codewarrior and have tried to make a dll using the code extern "C" __declspec(dlllexport)? whenever i ...

  1. #1
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125

    metrowerks codewarrior and dlls

    does anyone use metroweks codewarrior and have tried to make a
    dll using the code extern "C" __declspec(dlllexport)?
    whenever i try to compile it it says there is a decleration syntax error at the first apostrrify of C
    Does anyone have any sugjesttions on alternates that might work.
    I've also tried the method where you define that code to something else and use
    it instead of the whole thing but it didn't work now i just have the whole thing written
    above the function I need extractable
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Are you using apostraphe's or quotation marks?

  3. #3
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125
    qotations sorry
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

  4. #4
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    the only thing that stands out to me is how you spelled dllexport with three l's. I'm sure that's not the problem thought. It looks ok as it is.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  5. #5
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125
    i wonder then why my compiler dosent like it
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

  6. #6
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    __declspec(dll**port) is a linker instruction to guide the linker on how to resolve imported symbols....its not part of any language and so is very compiler/linker specific...

    To my knowledge (and my knowledge of CodeWarrior is brief), the instruction you want is __declspec(import) not __declspec(dllimport) ....I may be wrong on this though as I use MSVC++ more or less exclusively

  7. #7
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125
    thanx the import or export or dllexport dosent make a difference to the compiling but the export turns blue which means it is something like #define but the only way it'll compile is if i take out "C" But that problby means it wont work without the C whatever it means
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

  8. #8
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125
    God Fordy You are a genius thats all there is to it thank u so much! i geuss my compiler works with out the "C" because the hook works great!Ill say it again Fordy u are a genius!
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21