AllBASIC Forum
BASIC Developer & Support Resources => Open Forum => Topic started by: John on May 04, 2014, 09:59:55 PM
-
I was surprised to find out that Microsoft has no 64 bit version of Visual Studio. It can create 64 bit applications. Is it possible Microsoft could be that behind on the 64 bit front? I have been running true 64 bit on Linux for years.
-
The Visual Studio IDE and MS VC compilers are actually different applications, e.g. like Linux Code::Blocks and GCC. There's no correlation between the IDE's bitness and the bitness of compiler suite it controls. Just install it and forget; you will be able to create both 32- and 64-bit applications seamlessly.
I think MS actually is monitoring the developers' demand in this regard. Since WoW64 integration with the 64-bit Windows operating systems is perfect, maybe there's simply not enough interest to stimulate the extra effort (yet).
-
Just reconfirms what industry leaders have said all along. Microsoft has singlehandedly set back computing by at less 20 years.
-
Teletype ... oops, sorry ... terminal Linux is certainly not a model to take after either.
-
Teletype ... oops, sorry ... terminal Linux is certainly not a model to take after either.
At least Linux gives you the freedom to make it anything you think is better. I think there is more talent and manpower behind Linux that Microsoft / Apple could never afford no matter how much bucks and resources they think they have.
Maybe THIS (http://byobu.co/) will justify taking another look the TTY environment.
(http://files.allbasic.info/Mike/byobu.png)
Byobu Docs (https://help.ubuntu.com/community/Byobu)
-
I was able to compile the current 32 bit version of Script BASIC 2.2 with Visual Studio 2013. (console compiler) I have to say the compiler is much faster and was shocked at the support for ANSI C code. Everything compiled without error. I'm going to try 64 bit next.
-
... and then delete that notorious Linux and its GCC from my notebook altogether. " (c) JRS
;D
-
My two partitions get along just fine. I let Microsoft be my main development system for years. Windows didn't have its 64 bit act together enough to stay there.
-
In the meantime, you can download and install Immersive Explorer (http://www.julien-manici.com/immersive_explorer/) under your Windows 7 alongside its stock Explorer. It will give you an idea of what your Metro experience might be when you allocate yet one more partition and install Windows 8.1 on your notebook.
Don't hesitate - you can uninstall it completely once you've had your fun.
(http://julienmanici.blob.core.windows.net/screenshots/immersive_explorer_small.jpg)
-
Thanks for the pre-8.1 hint!
Is this like dating?
I'll be happy when I either run Ubuntu with X11 support or Windows 7 / 8.x on my Samsung Galaxy Tab 2 10.1 tablets. This is close. (touch, ext. mouse/keyboard all work)
(http://files.allbasic.info/ScriptBasic/ubuntu_android.png)
-
You're still under the hypnotic impact of the "Avatar" movie:
(http://91.207.61.14/m/uploads/v_p_images/2009/12/6190_4_screenshot.png)
Get back to earth and a decent PC-based workstation. Your tablets are functionally closer to a microwave oven than an electronic gadget. ;)
-
Your tablets are functionally closer to a microwave oven than an electronic gadget.
(http://www.toysrus.com/graphics/product_images/pTRU1-2870738dt.jpg)
-
That's it! Absolutely! ;D
-
Here is a screen shot of frying up the BaCon with my toy micro[wave oven].
(http://files.allbasic.info/BaCon/android_bacon.png)
-
How good is drawing performance compared to an average notebook?
-
Here is a Qt demo that is very cool and performs about the same as my laptop version of it. This is a native compiled Android Linux demo.
(http://files.allbasic.info/C4Droid/qtdemo.png)
This is a BaCon SDL example Peter wrote that I compiled native on Android with C4droid. (runs great)
(http://files.allbasic.info/C4Droid/sdldemo.png)
The Ubuntu examples I demonstrated prior are running in a chroot process along side Android Linux. It's using a VNC client for the X11 GUI support. It's usable but not something I would invest much time in. I'm waiting for Ubuntu Touch to become stable before putting much more effort into the tablet platform. I have a complete gcc environment created on a non-rooted tablet with SB, BaCon and SDL / APK packaging if I wish to share.
-
I have been searching the web for a 64 bit Windows libcurl download and only was able to find a build for MinGW64. I'm on the fence with using Microsoft VS2013 with 64 bit Windows builds. It seems MinGW64 is a safer bet at this point for cross platform libraries. I can understand the open source community not wanting to invest is VC based libraries when they now have a gcc compiler that works well on both 32 & 64 bit Windows. It's a sad fact but Microsoft once again missed the boat and got a late start on the 64 bit bandwagon. And they wonder what happened to there server business. (> 90% are 64 bit Linux servers)
FWIW All the core SB binaries and SB specific extension modules compiled 64 bit with VS2013. Finding open source 64 bit VC libraries is the trick.
-
Got this link from the Curl site. http://www.confusedbycode.com/curl/
Download the zip file, not the msi file, and just extract what you need.
The "Build Notes.txt" file says:
Built with Microsoft Visual Studio Express 2013 on April 10, 2014
-
Thanks AIR!
Good find. I used the Windows 64 bit MSI from cURL project site download wizard. (which spit out a MinGW64 surprise)
-
I had to manually hack the makefile to get it to work.
all : C:\sb22_64\source\bin\vc7\mod\lib\curl.lib C:\sb22_64\source\bin\vc7\mod\dll\curl.dll C:\sb22_64\source\bin\texi\mod_curl.texi
C:\sb22_64\source\bin\vc7\mod\lib\curl.lib : C:\sb22_64\source\bin\vc7\mod\obj\curl\s_interface.obj
lib /nologo /OUT:C:\sb22_64\source\bin\vc7\mod\lib\curl.lib C:\sb22_64\source\bin\vc7\mod\obj\curl\s_interface.obj libcurl.lib
C:\sb22_64\source\bin\vc7\mod\dll\curl.dll : C:\sb22_64\source\bin\vc7\mod\obj\curl\interface.obj
cl /LD /nologo /FeC:\sb22_64\source\bin\vc7\mod\dll\curl.dll C:\sb22_64\source\bin\vc7\mod\obj\curl\interface.obj libcurl.lib
C:\sb22_64\source\bin\vc7\mod\obj\curl\interface.obj : interface.c
cl /Ox /DWIN32 /MT /nologo /W0 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\curl\interface.obj interface.c
C:\sb22_64\source\bin\vc7\mod\obj\curl\s_interface.obj : interface.c
cl /Ox /DWIN32 /MT /nologo /W0 -DSTATIC_LINK=1 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\curl\s_interface.obj interface.c
C:\sb22_64\source\bin\texi\mod_curl.texi : manual.texi.jam
perl C:\sb22_64\source\jamal.pl manual.texi.jam C:\sb22_64\source\bin\texi\mod_curl.texi
perl C:\sb22_64\source\t2h.pl C:\sb22_64\source\bin\texi\mod_curl.texi
hhc C:\sb22_64\source\bin\texi\mod_curl.hhp & set ERRORLEVEL=0
C:\sb22_64\source\extensions\curl>nmake /A /B /f makefile.vc7
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl /Ox /DWIN32 /MT /nologo /W0 -DSTATIC_LINK=1 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\curl\s_interface.obj interface.c
interface.c
lib /nologo /OUT:C:\sb22_64\source\bin\vc7\mod\lib\curl.lib C:\sb22_64\source\bin\vc7\mod\obj\curl\s_interface.obj libcurl.lib
cl /Ox /DWIN32 /MT /nologo /W0 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\curl\interface.obj interface.c
interface.c
cl /LD /nologo /FeC:\sb22_64\source\bin\vc7\mod\dll\curl.dll C:\sb22_64\source\bin\vc7\mod\obj\curl\interface.obj libcurl.lib
Creating library C:\sb22_64\source\bin\vc7\mod\dll\curl.lib and object C:\sb22_64\source\bin\vc7\mod\dll\curl.exp
perl C:\sb22_64\source\jamal.pl manual.texi.jam C:\sb22_64\source\bin\texi\mod_curl.texi
perl C:\sb22_64\source\t2h.pl C:\sb22_64\source\bin\texi\mod_curl.texi
hhc C:\sb22_64\source\bin\texi\mod_curl.hhp & set ERRORLEVEL=0
Microsoft HTML Help Compiler 4.74.8702
Compiling c:\sb22_64\source\bin\texi\mod_curl.chm
Compile time: 0 minutes, 2 seconds
95 Topics
560 Local links
0 Internet links
0 Graphics
Created c:\sb22_64\source\bin\texi\mod_curl.chm, 57,119 bytes
Compression decreased file by 87,598 bytes.
C:\sb22_64\source\extensions\curl>
C:\sb22_64\source\bin\vc7\mod\dll>dumpbin /HEADERS curl.dll
Microsoft (R) COFF/PE Dumper Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
Last Edit: Today at 11:41:40 PM
Dump of file curl.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
8664 machine (x64)
5 number of sections
536DCCC3 time date stamp Fri May 09 23:52:51 2014
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL
OPTIONAL HEADER VALUES
20B magic # (PE32+)
12.00 linker version
10C00 size of code
C000 size of initialized data
0 size of uninitialized data
6A5C entry point (0000000180006A5C)
1000 base of code
180000000 image base (0000000180000000 to 000000018001FFFF)
1000 section alignment
200 file alignment
6.00 operating system version
0.00 image version
6.00 subsystem version
0 Win32 version
20000 size of image
400 size of headers
0 checksum
2 subsystem (Windows GUI)
160 DLL characteristics
High Entropy Virtual Addresses
Dynamic base
NX compatible
100000 size of stack reserve
1000 size of stack commit
100000 size of heap reserve
1000 size of heap commit
0 loader flags
10 number of directories
18040 [ 189] RVA [size] of Export Directory
181CC [ 3C] RVA [size] of Import Directory
0 [ 0] RVA [size] of Resource Directory
1E000 [ B10] RVA [size] of Exception Directory
0 [ 0] RVA [size] of Certificates Directory
1F000 [ 568] RVA [size] of Base Relocation Directory
0 [ 0] RVA [size] of Debug Directory
0 [ 0] RVA [size] of Architecture Directory
0 [ 0] RVA [size] of Global Pointer Directory
0 [ 0] RVA [size] of Thread Storage Directory
17420 [ 70] RVA [size] of Load Configuration Directory
0 [ 0] RVA [size] of Bound Import Directory
12000 [ 298] RVA [size] of Import Address Table Directory
0 [ 0] RVA [size] of Delay Import Directory
0 [ 0] RVA [size] of COM Descriptor Directory
0 [ 0] RVA [size] of Reserved Directory
C:\sb22_64\source\bin\vc7\mod\dll>dumpbin /EXPORTS curl.dll
Microsoft (R) COFF/PE Dumper Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file curl.dll
File Type: DLL
Section contains the following exports for curl.dll
00000000 characteristics
536DCCC3 time date stamp Fri May 09 23:52:51 2014
0.00 version
1 ordinal base
15 number of functions
15 number of names
ordinal hint RVA name
1 0 00005DC0 DllMain
2 1 00001040 bootmodu
3 2 00001100 finimodu
4 3 00005840 sb_curl_error
5 4 00005970 sb_curl_escape
6 5 00005460 sb_curl_finish
7 6 00005C10 sb_curl_getdate
8 7 00004E60 sb_curl_info
9 8 000011E0 sb_curl_init
10 9 00001440 sb_curl_option
11 A 00004C50 sb_curl_perform
12 B 00005AC0 sb_curl_unescape
13 C 00005D30 sb_curl_version
14 D 00001020 shutmodu
15 E 00001010 versmodu
Summary
5000 .data
1000 .pdata
7000 .rdata
1000 .reloc
11000 .text
C:\sb22_64\source\bin\vc7\mod\dll>
Thanks again for saving the day.
-
The 64 bit ODBC extension module compiled fine.
C:\sb22_64\source\extensions\odbc>nmake /A /B /f makefile.vc7
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl /Ox /DWIN32 /MT /nologo /W0 -DSTATIC_LINK=1 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\odbc\s_interface.obj interface.c
interface.c
lib /nologo /OUT:C:\sb22_64\source\bin\vc7\mod\lib\odbc.lib C:\sb22_64\source\bin\vc7\mod\obj\odbc\s_interface.obj odbc32.l
ib odbccp32.lib
cl /Ox /DWIN32 /MT /nologo /W0 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\odbc\interface.obj interface.c
interface.c
cl /LD /nologo /FeC:\sb22_64\source\bin\vc7\mod\dll\odbc.dll C:\sb22_64\source\bin\vc7\mod\obj\odbc\interface.obj odbc32.lib
odbccp32.lib
Creating library C:\sb22_64\source\bin\vc7\mod\dll\odbc.lib and object C:\sb22_64\source\bin\vc7\mod\dll\odbc.exp
perl C:\sb22_64\source\jamal.pl manual.texi.jam C:\sb22_64\source\bin\texi\mod_odbc.texi
perl C:\sb22_64\source\t2h.pl C:\sb22_64\source\bin\texi\mod_odbc.texi
hhc C:\sb22_64\source\bin\texi\mod_odbc.hhp & set ERRORLEVEL=0
Microsoft HTML Help Compiler 4.74.8702
Compiling c:\sb22_64\source\bin\texi\mod_odbc.chm
Compile time: 0 minutes, 2 seconds
11 Topics
80 Local links
0 Internet links
0 Graphics
Created c:\sb22_64\source\bin\texi\mod_odbc.chm, 20,371 bytes
Compression decreased file by 1,624 bytes.
C:\sb22_64\source\extensions\odbc>
-
Hi John,
A couple of questions, please:
1. How does the size of your 32-bit scribaw.exe built under MS VS 2013 compare to your earlier GCC builds?
2. What DLL dependencies does your new scribaw.exe use? You can check that in Dependency Walker (http://www.dependencywalker.com/).
Thanks.
-
1. How does the size of your 32-bit scribaw.exe built under MS VS 2013 compare to your earlier GCC builds?
The manifest resources are found with the source distribution of IUP. There are docs on the IUP site for compiling in resources. AIR built the last holy grail compiled resource for MinGW. It seems you beat me to the question. :D
2. What DLL dependencies does your new scribaw.exe use? You can check that in Dependency Walker (http://www.dependencywalker.com/).
scriba doesn't require any other dependencies. You can run any script I've posted not using an extension module with scriba alone. Or you can create a custom scriba of your own.
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include "scriba.h"
#include "cbasic.h"
MAIN
BEGIN_FUNCTION
DIM AS pSbProgram pProgram;
pProgram = scriba_new(malloc,free);
scriba_LoadConfiguration(pProgram, "/home/jrs/sb/sb22/bin/basic.conf");
scriba_SetFileName(pProgram, argv[1]);
scriba_LoadSourceProgram(pProgram);
scriba_Run(pProgram, argv[2]);
scriba_destroy(pProgram);
RETURN_FUNCTION(0);
END_FUNCTION
-
OK John,
Perhaps I didn't put the binary's name correctly. Obviously it should've been sbiup.exe, not scribaw.exe. I'm sorry for that. Nonetheless, the dependency question stays put:
scriba doesn't require any other dependencies.
This is not so. Here's how your 32-bit GCC version of scriba.exe looks in Dependency Walker (attached below). It enumerates the entire range of DLL dependencies that get mapped into the process memory when the program is launched for execution.
Dependency Walker is a small and handy utility to have on one's MS Windows PC. I'd recommend you to install a copy on yours by all means.
In case you don't want to do it, can I have a copy of your 32-bit VS 2013 scriba.exe zipped and uploaded here?
-
Sorry, I misunderstood your question. What I meant is that scriba doesn't require any non-standard Windows system resources.
-
I was able to get the 64 bit version of the Script BASIC IUP/CD extension module built. I haven't got theme support working yet. :-\
The 64 bit cURL module seems to be working with the limited tests I did.
Update:
I added the iup.res and the comctl32.lib to the make_vc7.jim file and scriba,exe appeared to have taken on the resource. (IUP icon for scriba.exe) When I try to use this version of scriba, it complains the IUP (pui.dll) module couldn't be loaded. :o
{#define StandardLibraries=ws2_32.lib advapi32.lib comctl32.lib iup.res}
I used air.o as my IUP resource and it's now working. (see attached)
-
Does anyone know how to disable the console and make scriba a windows application with VS2013 / VC12 console C++? I didn't have any issues with this using MinGW64.
This or just about any combination of case didn't work for me.
/SUBSYSTEM:windows
-
I'm using the Visual Studio 2013 IDE to build the 64 bit version of SDL_gfx.dll. All went well but it didn't create a SDL_gfx.lib which I need for the Script BASIC GFX extension module. I'm just getting up to speed using VS2013 and this seems to elude me at the moment.
Still no luck with getting a sbw64.exe built that doesn't pop the console window.
I have MySQL and SQLite3 64 bit compiled and working. Once I get the GFX extension module working, I'll post a binary zip for others to try and hopefully chime in with some feedback.
Update
I figured out how to build the SDL_gfx.lib file so that looks like one issue behind me.
1> SDL_gfx.vcxproj -> C:\SDL_gfx-2.0.25\x64\Release\SDL_gfx.lib
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
-
While trying to compile the Script BASIC GFX extension module I ran into this strange error preventing the module to compile. Any ideas?
C:\sb22_64\source\extensions\gfx>nmake /A /B /f makefile.vc7
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl /Ox /DWIN32 /MT /nologo /W0 -DSTATIC_LINK=1 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\gfx\s_interface.obj interface.c
interface.c
lib /nologo /OUT:C:\sb22_64\source\bin\vc7\mod\lib\gfx.lib C:\sb22_64\source\bin\vc7\mod\obj\gfx\s_interface.obj SDL.lib SD
L_gfx.lib
SDL_gfx.lib(SDL_framerate.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the lin
k command line to improve linker performance
cl /Ox /DWIN32 /MT /nologo /W0 /c /FoC:\sb22_64\source\bin\vc7\mod\obj\gfx\interface.obj interface.c
interface.c
cl /LD /nologo /FeC:\sb22_64\source\bin\vc7\mod\dll\gfx.dll C:\sb22_64\source\bin\vc7\mod\obj\gfx\interface.obj SDL.lib SDL_
gfx.lib
SDL_gfx.lib(SDL_framerate.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the lin
k command line to improve linker performance
Creating library C:\sb22_64\source\bin\vc7\mod\dll\gfx.lib and object C:\sb22_64\source\bin\vc7\mod\dll\gfx.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
Generating code
Finished generating code
MSVCRT.lib(MSVCR120.dll) : error LNK2005: free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR120.dll) : error LNK2005: malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(MSVCR120.dll) : error LNK2005: realloc already defined in LIBCMT.lib(realloc.obj)
C:\sb22_64\source\bin\vc7\mod\dll\gfx.dll : fatal error LNK1169: one or more multiply defined symbols found
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
C:\sb22_64\source\extensions\gfx>
-
I was able to get the Script BASIC GFX extension module to work by using the MinGW64 versions of gfx.dll and SDL_gfx.dll. I'm still using the VC version of SDL.dll. (see attached)
-
While trying to compile the Script BASIC GFX extension module I ran into this strange error preventing the module to compile. Any ideas?
1. Both MSVCRT and MSVCR120 are VC runtime libraries, the former being older and more basic, the latter adding more functionality and being more recent. There's a fair chance that those memory functions are defined in the both (too lazy to check in Dependency Walker myself though :) ).
Try to do what your linker suggests. Open PROJECT->BlaBla Settings->Connfiguration Properties->Linker->Command Line and add to Additional Options either /NODEFAULTLIB:MSVCRT or /NODEFAULTLIB:MSVCR120, click Apply and rebuild. I don't think it'll help you though. :)
2. The error you're reporting may also occur if some of the modules link against dynamic-link libraries while others link against static ones. This can be avoided in the following way. Go to PROJECT->BlaBla Settings->Configuration Properties->C/C++->Code Generation->Runtime Library and make sure:
2.1. your Debug and Release versions are set to /MTd and /MT, respectively, if you're linking everything statically; or
2.2. your Debug and Release versions are set to /MDd and /MD, respectively, if you want your project to link against dynamic link libraries.
It seems mixed linking is not permitted in your case due to naming conflicts.
I think this second hint will help.
-
Everything but the GFX extension module is compiled with VS2013 console VC++ 12 compiler. As long as the MinGW64-TDM gcc compiler plays well with VC, I'm happy. I'm not going to fight with Microsoft's compiler that can't figure out what system resource to use and asks me to experiment with compiler switchs to work it out. :o
The GFX extension module is the most complex linking wise of all the extension modules. (scriba -> gfx.dll (sb ext. mod.) -> SDL_gfx.dll -> SDL.dll)
I would rather spend the effort trying to get scriba to look like a Windows application. :-\ (no console support) I can create a sbiup.exe (Windows application) fine with MinGW64-TDM.
-
I'm not going to fight with Microsoft's compiler that can't figure out what system resource to use and asks me to experiment with compiler switchs to work it out.
MS VC is considerably stricter to its source code input than GCC. Without major rework, the FBSL sources can't be compiled with VC in principle. OTOH VC binary output may be substantially smaller than that of GCC and it compiles faster.
-
The important thing was I was able to get a Windows 64 bit version of Script BASIC and its extension modules working. I don't have a problem releasing the GFX extension module and sbw64.exe (GUI only - no console support) as MinGW64-TDM compiled binaries. I knew going into this Microsoft was the underdog with 64 bit compatibility. I hope to post a zip of this soon.
-
Mike,
Looks like you're right about VC12 being a bit faster than MinGW64, Here is the Mandelbrot example we used before. I also attached the Linux Script BASIC version. (64 bit this time)
' ScriptBasic GFX - Mandelbrot
IMPORT gfx.inc
s = gfx::Window(640,480,"ScriptBasic GFX Mandelbrot")
ts = gfx::Time()
FOR y = 0 TO 479
FOR x = 0 TO 639
cx = (x - 320) / 120
cy = (y - 240) / 120
rit = gfx::Mandelbrot(cx, cy, 510)
gfx::PixelRGBA s, x, y, rit * 32, rit * 16, rit * 8, 255
NEXT
NEXT
te = gfx::Time()
gfx::stringColor s, 20, 15, "Time: " & FORMAT("%.4f",(te-ts)/1000) & " Seconds." & CHR(0), 0x000000ff
gfx::Update
WHILE gfx::KeyName(1) <> "+escape"
WEND
gfx::Close
-
I guess the first one is VC12, the second one, GCC, while the third one is obviously Ubuntu?
If my guess is right then more than two times faster is not "a bit faster". That's a hell of a lot faster! :)
-
You are correct in your assumptions. VC12 is definitely more picky and unforgiving. :-\