c - Error while compiling and linking dll -


I am trying to compile the following simple DLL. I have been successful in doing everything successfully, but the last step When I execute the command:

  gcc-o Maiprog myprog.c -l./ -lmydll   

me say it gives an error that Hello () has not been declared in the area I was unable to follow the tutorial verbatim, even though I compiled yet simple project I and why I am so why lose.

The code for individual files is as follows:

(myprog .c)

  int main (zero) {hello (); }   

(mydll.c)

  #include & lt; Stdio.h & gt; Int Hello () {printf ("Hello World! \ N"); Return 0; }    

The example is working fine for me in my signin < pre> armathew @ 3NJ2VQ1 / cygdrive / d / userdata / armathew / desktop / WWWW $ ls mydll.c myprog.c armathew @ 3NJ2VQ1 / cygdrive / d / userdata / armathew / desktop / WWWW $ gcc -c mydll.c armathew @ 3 NJ 2 VQ-1 / Saigraiv / D / Ughrdeta / Armthu / desktop / Dbludbludbludblu $ GCC -sear O Maidel Dial Maidelko Armethv @ 3 NJ 2 VQ-1 / Saigrediv / D / Ugrdata / Armethu / desktop / Double Udbludbludblu $ gcc -o Mayprog Mayprog. - L. / -LMDL Armheave @ 3 NJ2VQ1 / Cyndreid / D / Usager / Armuitu / Desktop / WWW $ ./myprog.exe Hello World!

What is the saver version you are using? I 1.7.5

  armathew @ 3NJ2VQ1 / cygdrive / d / userdata / armathew / desktop / WWWW $ uname -r 1.7.5 (0.225 / 5/3)    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -