zf8848 / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

How do I use libjingle 0.5 to create own applicatons? (I have it compiled) #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
So after hours of trying and trying, I managed to compile libjingle 0.5 under 
Windows XP. Anyways.

How am I supposed to use this library?

I mean, in the old 0.4, there was a VS project we could use to write our own 
apps and so. But now in 0.5, the only "useful" I can see, is the libjingle.lib 
file created by the compilation of the project. And I'm trying to link it in a 
self-made project, but it doesn't seem to work that way.

Yes, the sample programs are there, but I don't want to compile my own projects 
like this, using those tools and so. I want to run and build this in a VS 
environment, is that possible?

Maybe there's just me not understanding how to use it really, please excuse me 
if that's the case.

Original issue reported on code.google.com by halz...@gmail.com on 2 Jan 2011 at 9:00

GoogleCodeExporter commented 9 years ago
In the "main.scons" file, search for "visual studio". You can find the 
instruction on how to generate VS .proj and .sln files.

Original comment by jun...@google.com on 14 Jan 2011 at 4:40

GoogleCodeExporter commented 9 years ago
instruction:
# .sln creation code lifted from googleclient/bar/main.scons.  Must be after
# the call to BuildEnvironments for all_foo aliases to be defined.
# Run 'hammer --mode=all --vsproj' to generate

but error occurs:
D:\libjingle\talk>..\..\packages\swtoolkit\hammer.bat --mode=all --vsproj
scons: Reading SConscript files ...
Warning: Unable to load win32file module; using copy instead of hard linking 
for env.Install().  Is
pywin32 present?

scons: warning: The build_dir keyword has been deprecated; use the variant_dir 
keyword instead.
File "D:\packages\swtoolkit\site_scons\site_init.py", line 203, in
 BuildEnvironmentSConscripts

scons: warning: The build_dir keyword has been deprecated; use the variant_dir 
keyword instead.
File "D:\packages\swtoolkit\site_scons\site_init.py", line 203, in
 BuildEnvironmentSConscripts
TypeError: ComponentVSSolution() takes at least 3 arguments (3 given):
  File "D:\libjingle\talk\main.scons", line 473:
    projects = [p],
  File "C:\Python27\Lib\site-packages\scons-2.0.1\SCons\Environment.py", line 222:
    return self.method(*nargs, **kwargs)

why?

Original comment by greatfoolbear on 14 Jan 2011 at 3:07

GoogleCodeExporter commented 9 years ago
Issue 120 has been merged into this issue.

Original comment by jun...@google.com on 14 Jan 2011 at 5:16

GoogleCodeExporter commented 9 years ago
On line 473 or whatever it is for you, change "projects = [p]" to just "[p]", 
without the quotes of course. Must be some kind of typo..

Anyway, if you do so, you will end up with a .sln file, which does nothing, and 
a warning:
Warning: ignoring unknown target "flute_source.vcproj"

So what is this all about? Must be something missing?

Original comment by e.mathia...@gmail.com on 14 Jan 2011 at 11:18

GoogleCodeExporter commented 9 years ago
It'll generate libjingle.sln file as well as a list of .proj files under:

...\talk\build\solution\projects

You can load the .sln file with VS and add source files into each project.

Original comment by jun...@google.com on 15 Jan 2011 at 1:20

GoogleCodeExporter commented 9 years ago
#5: Yes, I guess that's the purpose, but I've now downloaded the 0.5.2, 
compiled it, and tried with "hammer.bat --mode=all --vsproj", but it gives me 
the same error as #2:

File "C:\talk\swtoolkit\site_scons\site_init.py", line 203, in BuildEnvironment
Conscripts
TypeError: ComponentVSSolution() takes at least 3 non-keyword arguments (2 
given):
  File "C:\talk\main.scons", line 473:
    projects = [p],
  File "C:\scons\scons-local-2.0.1\SCons\Environment.py", line 222:
    None

If I change line 472 to "[p]", here's the output:
Warning: ignoring unknown target "flute_source.vcproj"
***Unfortunately the vsproj creator isn't smart enough to
***automatically get the correct output locations.  It is very easy
***though to change it in the properties pane to the following
***($SolutionDir)/build/<foo>/staging/<bar>.exe
scons: done reading SConscript files.
scons: Building targets ...
ComponentVSSolutionBuilder(["build\solution\all_libraries all_programs 
all_test_programs.sln"], [])
scons: done building targets.

And all there is to see in ...\talk\build\solution\ is a file called 
"all_libraries all_programs all_test_programs.sln" which is just a empty 
solution if I open it on VS..

Is there something missing or? What is it about that "flute" thingy?

Original comment by halz...@gmail.com on 15 Jan 2011 at 2:31

GoogleCodeExporter commented 9 years ago
the same with you.
I using vs2010+python2.7+scons-2.0.1+swtoolkit.0.9.1。
Is this matter?

Original comment by greatfoolbear on 15 Jan 2011 at 4:36

GoogleCodeExporter commented 9 years ago
The hammer build is not smart enough to know where your source code is located, 
so it generated an empty .sln file.
You can load it with VS then add your source code there. It's mainly for 
setting the compiling options.

Original comment by jun...@google.com on 25 Jan 2011 at 9:13

GoogleCodeExporter commented 9 years ago
errer occur, not just empty sln file.
please fix it.

Original comment by greatfoolbear on 26 Jan 2011 at 3:36

GoogleCodeExporter commented 9 years ago
agreed, win7 x64

unable to build sln files by "hammer --mode=all --vsproj" - it output 
"TypeError: ComponentVSSolution() takes at least 3 non-keyword arguments (2 
given):"  

Anyway, plain "hammer.bat" runs works perfect and makes lib and example

Original comment by inger...@gmail.com on 31 Jan 2011 at 12:06

GoogleCodeExporter commented 9 years ago
I am using libjingle-0.5.1 and VisualStudio2005

Issue-
Unable to build sln files by "hammer --mode=all --vsproj"

Getting an err like

TypeError: ComponentVSSolution() takes at least 3 arguments (3 given):
  File "D:\YogeshR\google Chat\libjingle-0.5.1\talk\main.scons", line 458:
    projects = [p],

'hammer.bat' without parameter, runs perfect and makes lib and examples

I created the new project, added existing items from example source and used 
the lib files created by running hammer.bat. But I am getting error while 
linking to libjingle.lib

Any solution??? to setup an environment , so code get run in VisualStudio2005.

Thanks in advance.

Original comment by yogesh.r...@gmail.com on 8 Feb 2011 at 1:00

GoogleCodeExporter commented 9 years ago
In the mail.scons file, find the following section:

# Solution and target projects
  s = vs_env.ComponentVSSolution(
    'libjingle',
    ['all_libraries', 'all_programs', 'all_test_programs'],
    project = [p],
  )

and make change as the same as above. 
Basically, the first parameter was missing. This issue has been fixed and will 
be pushed out in the next release (libjingle 0.5.3) 

Original comment by jun...@google.com on 8 Feb 2011 at 6:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes,it created an empty .sln file,but how can I use it;I want to use the 
debugging mode with VS2010,someone has idea?

Original comment by zhengxue...@gmail.com on 16 Dec 2011 at 5:05

GoogleCodeExporter commented 9 years ago
Yes, the "empty .sln" is a known issue. It will involve some manual tweaks. 
We'll fix this issue in the future, but rather a lower priority for now.

Original comment by jun...@google.com on 3 Jan 2012 at 9:51

GoogleCodeExporter commented 9 years ago
Issue 220 has been merged into this issue.

Original comment by jun...@google.com on 3 Jan 2012 at 9:52

GoogleCodeExporter commented 9 years ago
Centralize the same issues to #242

Original comment by jun...@google.com on 3 Jan 2012 at 10:25