Revert "Fix Windows toolbox compilation" 26/16526/1
Vincent COUVERT [Fri, 29 May 2015 07:41:24 +0000 (09:41 +0200)]
Breaks dynamic_link under Linux: requires -std=c++11
Breaks dynamic_link under Windows: missing includes (SCI\modules\ast\includes\analysis\gvn\*.*) in binary version.

This reverts commit 7ada81d1ab54967b8208bb1933e519c1089087f4.

Change-Id: Iad4692c0654566d1c324eb18b14a27196e663b2d

scilab/contrib/toolbox_skeleton/builder.sce
scilab/modules/core/macros/isRelease.sci
scilab/modules/dynamic_link/macros/ilib_gen_gateway.sci

index c96c577..7c080d9 100644 (file)
@@ -7,6 +7,8 @@ mode(-1);
 lines(0);
 
 function main_builder()
+
+    setenv('DEBUG_SCILAB_DYNAMIC_LINK','YES')
     TOOLBOX_NAME  = "toolbox_skeleton";
     TOOLBOX_TITLE = "Toolbox Skeleton";
     toolbox_dir   = get_absolute_file_path("builder.sce");
index 5b1a896..c3fb7ee 100644 (file)
@@ -6,9 +6,5 @@
 // =============================================================================
 function ret = isRelease()
     [a,b] = getversion();
-    if or(getscilabmode() == ["NWNI", "SCILAB_API"]) then
-        ret = b(4) == "release";
-    else
-        ret = b(5) == "release";
-    end
+    ret = b(4) == "release";
 endfunction
index 6158922..82cb725 100644 (file)
@@ -66,15 +66,8 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         if ( nt <> 3 ) then
             error(msprintf(gettext("%s: Wrong size for input argument #%d: %d expected.\n"),"ilib_gen_gateway",2,3));
         end
-
+        [gate,names,cppCompilation] = new_names(table);
         global cppCompilation;
-        if isempty(cppCompilation) then
-            cppCompilation = %f;
-        end
-
-        [gate,names,cpp] = new_names(table);
-        cppCompilation = cppCompilation | cpp;
-
         //generate cpp interface file
         if  cppCompilation then
             t = [
@@ -160,11 +153,9 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         "#define " + TNAME + "_GW_IMPEXP";
         "#endif";
         "";
-        "#include <cpp_gateway_prototype.hxx>";
-        "";
         "extern ""C"" " + TNAME + "_GW_IMPEXP int " + tname + "(wchar_t* _pwstFuncName);";
         "";
-        unique(gate(:, 2));
+        gate(:, 2);
         "";
         "#endif /* __" + TNAME + "_GW_HXX__ */"];
 
@@ -191,7 +182,7 @@ function gateway_filename = ilib_gen_gateway(name,tables)
         "";
         "#include ""c_gateway_prototype.h""";
         "";
-        unique(gate(:, 1));
+        gate(:, 1);
         "";
         "#endif /* __" + TNAME + "_GW_H__ */"];