Author Topic: codeblocks mingw linker the Static library that make in VC  (Read 3035 times)

Offline lfjking

  • Multiple posting newcomer
  • *
  • Posts: 17
codeblocks mingw linker the Static library that make in VC
« on: February 07, 2017, 07:09:35 am »
Now  the Other man have a DLL (a.dll) that make in VC
so, I  use VC  write a  Static library  (a.lib) to  linke the DLL
a.lib have one Fun:
Code
extern "C" int Init(char*);
now , the codeblocks linker a.lib have the question:
Code
mylib.cpp: undefined reference to `Init'
but, I look for the a.lib with the VS Cmd dumpbin /linkermember , it can look up Init Fun.
there the question ?
It took me 3 days long........

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: codeblocks mingw linker the Static library that make in VC
« Reply #1 on: February 07, 2017, 08:53:15 am »
And the question is?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline lfjking

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: codeblocks mingw linker the Static library that make in VC
« Reply #2 on: February 07, 2017, 12:47:13 pm »
question?
the title !
yes, this is a obscure question....
I  want to know, how to linker the  vc dll with codeblocks mingw

Can  you give me some key points? thanks!

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: codeblocks mingw linker the Static library that make in VC
« Reply #3 on: February 07, 2017, 03:11:49 pm »
This isn't a codeblocks question. It is a question of how to link code with different compilers.

In short I don't think you can link a VC export library in mingw. Instead look up LoadLibrary/GetProcAddress.

Offline lfjking

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: codeblocks mingw linker the Static library that make in VC
« Reply #4 on: February 07, 2017, 03:39:54 pm »
Thanks for help,  may be  this is the Perfect answer

I thought codeblock would have a function to generate a boot library dll.a to solve this problem。

may be We can  do this,

But my skill is not enough......

thanks again ;D ;D ;D ;D

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: codeblocks mingw linker the Static library that make in VC
« Reply #5 on: February 07, 2017, 03:53:52 pm »

Offline lfjking

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: codeblocks mingw linker the Static library that make in VC
« Reply #6 on: February 07, 2017, 06:13:45 pm »
Oh,  good idea;

Thanks very much! ;D ;D