Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Application without huge dll files  (Read 7266 times)

0 Members and 1 Guest are viewing this topic.

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« on: February 15, 2011, 08:39:31 am »
I made a game but I am using window, graphics and system. Their DLL files have 12,5 mb, so is there any way how to link it to exe please  :roll: ? I tried use -s
Code: [Select]
-lsfml-system -s
...
...

But it doesnt work.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Application without huge dll files
« Reply #1 on: February 15, 2011, 08:46:46 am »
Which compiler / OS / version of SFML? Which errors?
Laurent Gomila - SFML developer

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« Reply #2 on: February 15, 2011, 09:10:35 am »
Win XP Home Edition , MinGW, CodeBlocks 10.5, no errors but when I try to run program without DLL files, "Not found sfml-graphics", SFML 1.6

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Application without huge dll files
« Reply #3 on: February 15, 2011, 09:25:16 am »
-s is not a linker option, it's a suffix for SFML libraries
Code: [Select]
-lsfml-system-s
Laurent Gomila - SFML developer

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« Reply #4 on: February 15, 2011, 09:47:05 am »
When I use -s as you said
Code: [Select]
-lsfml-system-s
-lsfml-window-s
-lsfml-graphics-s

I get a lot of errors
"undefined reference to `....
undefined reference to `....
undefined reference to `....
undefined reference to `....
..."

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Application without huge dll files
« Reply #5 on: February 15, 2011, 10:09:51 am »
You cut the interesting part of the error.  :P

But I guess it's reference against OpenGL and the other lib used by SFML. When statically linking against SFML you also need to link against these libs.
SFML / OS X developer

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« Reply #6 on: February 15, 2011, 10:15:54 am »
which .a have to I link also?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Application without huge dll files
« Reply #7 on: February 15, 2011, 10:27:05 am »
Maybe I was wrong – we'll see later.

You have skip a point of the tutorial :
Quote
When linking to multiple SFML libraries, make sure you link them in the right order, as it's important for MinGW. The rule is the following : if library XXX depends on (uses) library YYY, put XXX first and then YYY. An exemple with SFML : sfml-graphics depends on sfml-window, and sfml-window depends an sfml-system. The link options would be as follows :

-lsfml-graphics
-lsfml-window
-lsfml-system
 :wink:
SFML / OS X developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Application without huge dll files
« Reply #8 on: February 15, 2011, 10:44:48 am »
Remove SFML_DYNAMIC from your preprocessor options.
Laurent Gomila - SFML developer

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« Reply #9 on: February 15, 2011, 10:45:05 am »
I used
Code: [Select]
-lsfml-graphics-s
-lsfml-window-s
-lsfml-system-s

and the same errors :(

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« Reply #10 on: February 15, 2011, 11:00:14 am »
I removed SFML_DYNAMIC from #defines but I get the same errors

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Application without huge dll files
« Reply #11 on: February 15, 2011, 11:19:06 am »
You can't have undefined references to "_imp___" stuff if you don't define SFML_DYNAMIC. Unless you use SFML 2, but you said you use 1.6.

Try "rebuild all", just in case.
Laurent Gomila - SFML developer

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« Reply #12 on: February 15, 2011, 11:32:22 am »
So I am using 2.0 instead of 1.6?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Application without huge dll files
« Reply #13 on: February 15, 2011, 11:40:19 am »
I don't know... I'm not inside your hard disk ;)

It seems like you don't really understand what you did and what to do now. Remove everything related to SFML, download it again, install it and retry from scratch. And make sure that you understand every step of the process ;)

Ps: please don't post wide screenshots, it makes the topic less convenient to navigate on smaller screens because of the horizontal scrollbar.
Laurent Gomila - SFML developer

reDo

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Application without huge dll files
« Reply #14 on: February 15, 2011, 12:19:00 pm »
I deleted SFML from CodeBlocks include, bin and lib. Pictures of settings of my project now.




 

anything